Skip to content

Commit 94f5497

Browse files
author
Cari Spruiell
committed
MAGETWO-37464: Merge and Fix Builds
- fix build failures
1 parent 8dcfe83 commit 94f5497

File tree

2 files changed

+36
-2
lines changed

2 files changed

+36
-2
lines changed

app/code/Magento/Rss/App/Action/Plugin/BackendAuthentication.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ class BackendAuthentication extends \Magento\Backend\App\Action\Plugin\Authentic
4444
* @param ResponseInterface $response
4545
* @param \Magento\Framework\App\ActionFlag $actionFlag
4646
* @param \Magento\Framework\Message\ManagerInterface $messageManager
47+
* @param \Magento\Backend\Model\UrlInterface $backendUrl
48+
* @param \Magento\Framework\Controller\Result\RedirectFactory $resultRedirectFactory
49+
* @param \Magento\Backend\App\BackendAppList $backendAppList
4750
* @param \Magento\Framework\HTTP\Authentication $httpAuthentication
4851
* @param \Psr\Log\LoggerInterface $logger
4952
* @param \Magento\Framework\AuthorizationInterface $authorization
@@ -55,6 +58,9 @@ public function __construct(
5558
ResponseInterface $response,
5659
\Magento\Framework\App\ActionFlag $actionFlag,
5760
\Magento\Framework\Message\ManagerInterface $messageManager,
61+
\Magento\Backend\Model\UrlInterface $backendUrl,
62+
\Magento\Framework\Controller\Result\RedirectFactory $resultRedirectFactory,
63+
\Magento\Backend\App\BackendAppList $backendAppList,
5864
\Magento\Framework\HTTP\Authentication $httpAuthentication,
5965
\Psr\Log\LoggerInterface $logger,
6066
\Magento\Framework\AuthorizationInterface $authorization,
@@ -64,7 +70,8 @@ public function __construct(
6470
$this->logger = $logger;
6571
$this->authorization = $authorization;
6672
$this->aclResources = $aclResources;
67-
parent::__construct($auth, $url, $response, $actionFlag, $messageManager);
73+
parent::__construct($auth, $url, $response, $actionFlag, $messageManager, $backendUrl, $resultRedirectFactory,
74+
$backendAppList);
6875
}
6976

7077
/**

setup/src/Magento/Setup/Test/Unit/Controller/IndexTest.php

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,37 @@
1010

1111
class IndexTest extends \PHPUnit_Framework_TestCase
1212
{
13+
/**
14+
* @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Setup\Model\ObjectManagerProvider
15+
*/
16+
private $objectManagerProvider;
17+
18+
/**
19+
* @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\ObjectManagerInterface
20+
*/
21+
private $objectManager;
22+
23+
/**
24+
* @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\App\DeploymentConfig
25+
*/
26+
private $deploymentConfig;
27+
1328
public function testIndexAction()
1429
{
30+
$this->objectManager = $this->getMockForAbstractClass('Magento\Framework\ObjectManagerInterface');
31+
$this->objectManagerProvider = $this->getMock(
32+
'Magento\Setup\Model\ObjectManagerProvider',
33+
['get'],
34+
[],
35+
'',
36+
false
37+
);
38+
$this->deploymentConfig = $this->getMock('Magento\Framework\App\DeploymentConfig', [], [], '', false);
39+
$this->objectManagerProvider->expects($this->once())->method('get')->willReturn($this->objectManager);
40+
$this->objectManager->expects($this->once())->method('get')->willReturn($this->deploymentConfig);
41+
$this->deploymentConfig->expects($this->once())->method('isAvailable')->willReturn(false);
1542
/** @var $controller Index */
16-
$controller = new Index();
43+
$controller = new Index($this->objectManagerProvider);
1744
$viewModel = $controller->indexAction();
1845
$this->assertInstanceOf('Zend\View\Model\ViewModel', $viewModel);
1946
$this->assertFalse($viewModel->terminate());

0 commit comments

Comments
 (0)