Skip to content

Commit 4387ab3

Browse files
author
OlgaVasyltsun
committed
MC-14894: The *Recently Viewed Products* widget not displayed when more one product it was viewed
1 parent d2ce214 commit 4387ab3

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

app/code/Magento/Catalog/Test/Unit/Model/Product/ProductFrontendAction/SynchronizerTest.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,11 @@ protected function setUp()
8181
/**
8282
* @dataProvider filterProductActionsDataProvider
8383
*
84-
* @param $productsData
84+
* @param array $productsData
85+
* @param bool $correct
8586
* @return void
8687
*/
87-
public function testFilterProductActions($productsData, $correct)
88+
public function testFilterProductActions(array $productsData, bool $correct)
8889
{
8990
$frontendConfiguration = $this->createMock(\Magento\Catalog\Model\FrontendStorageConfigurationInterface::class);
9091
$frontendConfiguration->expects($this->once())
@@ -160,6 +161,11 @@ public function testFilterProductActions($productsData, $correct)
160161
]
161162
)
162163
->willReturnOnConsecutiveCalls($action1, $action2);
164+
} else {
165+
$this->entityManagerMock->expects($this->never())
166+
->method('delete');
167+
$this->entityManagerMock->expects($this->never())
168+
->method('save');
163169
}
164170

165171
$this->model->syncActions($productsData, 'recently_compared_product');

0 commit comments

Comments
 (0)