Skip to content

Commit 35a1aa8

Browse files
fixed unit test
1 parent 883f89b commit 35a1aa8

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

app/code/Magento/Catalog/Test/Unit/Model/ProductTest.php

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -508,28 +508,17 @@ public function testGetStoreIds()
508508
/**
509509
* @dataProvider getSingleStoreIds
510510
* @param bool $isObjectNew
511+
* @return void
511512
*/
512-
public function testGetStoreSingleSiteModelIds(
513-
bool $isObjectNew
514-
) {
513+
public function testGetStoreSingleSiteModelIds(bool $isObjectNew): void
514+
{
515515
$websiteIDs = [0 => 2];
516-
$this->model->setWebsiteIds(
517-
!$isObjectNew ? $websiteIDs : array_flip($websiteIDs)
518-
);
516+
$this->model->setWebsiteIds(!$isObjectNew ? $websiteIDs : array_flip($websiteIDs));
519517

520518
$this->model->isObjectNew($isObjectNew);
521519

522-
$this->storeManager->expects(
523-
$this->exactly(
524-
(int)!$isObjectNew
525-
)
526-
)
527-
->method('isSingleStoreMode')
528-
->willReturn(true);
529-
530-
$this->website->expects(
531-
$this->once()
532-
)->method('getStoreIds')
520+
$this->website->expects($this->once())
521+
->method('getStoreIds')
533522
->willReturn($websiteIDs);
534523

535524
$this->assertEquals($websiteIDs, $this->model->getStoreIds());

0 commit comments

Comments
 (0)