Skip to content

Commit 7a78b66

Browse files
committed
MC-21897: Fatal error catalogpermissions_product indexer does not exist during cron reindex
1 parent 9d78ea7 commit 7a78b66

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

lib/internal/Magento/Framework/Mview/Test/Unit/ViewTest.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ protected function setUp()
5151
['getView']
5252
);
5353
$this->actionFactoryMock = $this->createPartialMock(\Magento\Framework\Mview\ActionFactory::class, ['get']);
54-
$this->stateMock = $this->createPartialMock(\Magento\Indexer\Model\Mview\View\State::class, ['getViewId',
54+
$this->stateMock = $this->createPartialMock(
55+
\Magento\Indexer\Model\Mview\View\State::class,
56+
[
57+
'getViewId',
5558
'loadByView',
5659
'getVersionId',
5760
'setVersionId',
@@ -62,7 +65,8 @@ protected function setUp()
6265
'setMode',
6366
'save',
6467
'__wakeup',
65-
]);
68+
]
69+
);
6670
$this->changelogMock = $this->createPartialMock(
6771
\Magento\Framework\Mview\View\Changelog::class,
6872
['getViewId', 'setViewId', 'create', 'drop', 'getVersion', 'getList', 'clear']
@@ -182,11 +186,11 @@ public function testSubscribeWithException()
182186

183187
$this->changelogMock->expects($this->once())
184188
->method('create')
185-
->will($this->returnCallback(
189+
->willReturnCallback(
186190
function () {
187191
throw new \Exception();
188192
}
189-
));
193+
);
190194

191195
$this->loadView();
192196
$this->model->subscribe();
@@ -245,11 +249,11 @@ public function testUnsubscribeWithException()
245249
$subscriptionMock = $this->createPartialMock(\Magento\Framework\Mview\View\Subscription::class, ['remove']);
246250
$subscriptionMock->expects($this->exactly(1))
247251
->method('remove')
248-
->will($this->returnCallback(
252+
->willReturnCallback(
249253
function () {
250254
throw new \Exception();
251255
}
252-
));
256+
);
253257
$this->subscriptionFactoryMock->expects($this->exactly(1))
254258
->method('create')
255259
->will($this->returnValue($subscriptionMock));

0 commit comments

Comments
 (0)