Skip to content

Commit fccb9bf

Browse files
MC-40371: Moving category in hierarchy causes url_path to be incorrect
1 parent 27cd82d commit fccb9bf

File tree

1 file changed

+4
-5
lines changed
  • app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Category/Plugin/Category

1 file changed

+4
-5
lines changed

app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Category/Plugin/Category/MoveTest.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,27 +91,26 @@ protected function setUp(): void
9191
public function testAfterChangeParent()
9292
{
9393
$urlPath = 'test/path';
94-
$storeIds = [1];
94+
$storeIds = [0, 1];
9595
$originalCategory = $this->getMockBuilder(Category::class)
9696
->disableOriginalConstructor()
9797
->getMock();
9898
$this->categoryFactory->method('create')
9999
->willReturn($originalCategory);
100-
101100
$this->categoryMock->method('getResource')
102101
->willReturn($this->subjectMock);
103102
$this->categoryMock->expects($this->once())
104103
->method('getStoreIds')
105104
->willReturn($storeIds);
106-
$this->childrenCategoriesProviderMock->expects($this->once())
105+
$this->childrenCategoriesProviderMock->expects($this->exactly(2))
107106
->method('getChildren')
108107
->with($this->categoryMock, true)
109108
->willReturn([]);
110-
$this->categoryUrlPathGeneratorMock->expects($this->once())
109+
$this->categoryUrlPathGeneratorMock->expects($this->exactly(2))
111110
->method('getUrlPath')
112111
->with($this->categoryMock)
113112
->willReturn($urlPath);
114-
$this->categoryMock->expects($this->once())
113+
$this->categoryMock->expects($this->exactly(2))
115114
->method('setUrlPath')
116115
->with($urlPath);
117116
$this->assertSame(

0 commit comments

Comments
 (0)