Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 8c13297

Browse files
committed
MAGETWO-71554: Category edit performance issue - for 2.2
1 parent f84d8b5 commit 8c13297

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

app/code/Magento/Catalog/Test/Unit/Model/Category/Product/PositionResolverTest.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,20 @@ class PositionResolverTest extends \PHPUnit\Framework\TestCase
4848
'1' => 102
4949
];
5050

51+
/**
52+
* @var array
53+
*/
5154
private $flippedPositions = [
5255
'100' => 3,
5356
'101' => 2,
5457
'102' => 1
5558
];
5659

60+
/**
61+
* @var int
62+
*/
63+
private $categoryId = 1;
64+
5765
protected function setUp()
5866
{
5967
$this->context = $this->getMockBuilder(Context::class)
@@ -107,6 +115,6 @@ public function testGetPositions()
107115
->method('fetchCol')
108116
->willReturn($this->positions);
109117

110-
$this->assertEquals($this->flippedPositions, $this->model->getPositions(1));
118+
$this->assertEquals($this->flippedPositions, $this->model->getPositions($this->categoryId));
111119
}
112120
}

app/code/Magento/CatalogRule/Test/Unit/Model/Indexer/IndexBuilderTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,7 @@ protected function setUp()
209209
'dateFormat' => $this->dateFormat,
210210
'dateTime' => $this->dateTime,
211211
'productFactory' => $this->productFactory,
212-
1000,
213-
'productLoader' => $this->productLoader
212+
'productLoader' => $this->productLoader,
214213
]
215214
);
216215

0 commit comments

Comments
 (0)