Skip to content

Commit

Permalink
Static test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Nazar65 committed Dec 17, 2019
1 parent 6c47a75 commit a86d795
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
namespace Magento\Indexer\Test\Unit\Controller\Adminhtml\Indexer;

/**
* Mass invalidate Test
*
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class MassInvalidateTest extends \PHPUnit\Framework\TestCase
Expand Down Expand Up @@ -91,7 +93,9 @@ class MassInvalidateTest extends \PHPUnit\Framework\TestCase
*/
protected function setUp()
{
$this->contextMock = $this->createPartialMock(\Magento\Backend\App\Action\Context::class, [
$this->contextMock = $this->createPartialMock(
\Magento\Backend\App\Action\Context::class,
[
'getAuthorization',
'getSession',
'getActionFlag',
Expand All @@ -107,14 +111,17 @@ protected function setUp()
'getObjectManager',
'getMessageManager',
'getResultRedirectFactory',
]);
]
);

$this->response = $this->createPartialMock(
\Magento\Framework\App\ResponseInterface::class,
['setRedirect', 'sendResponse']
);

$this->view = $this->createPartialMock(\Magento\Framework\App\ViewInterface::class, [
$this->view = $this->createPartialMock(
\Magento\Framework\App\ViewInterface::class,
[
'loadLayout',
'getPage',
'getConfig',
Expand All @@ -129,7 +136,8 @@ protected function setUp()
'addActionLayoutHandles',
'setIsLayoutLoaded',
'isLayoutLoaded'
]);
]
);

$this->session = $this->createPartialMock(\Magento\Backend\Model\Session::class, ['setIsUrlNotice']);
$this->session->expects($this->any())->method('setIsUrlNotice')->willReturn($this->objectManager);
Expand Down

0 comments on commit a86d795

Please sign in to comment.