Skip to content

Commit 4501b8a

Browse files
committed
fix static, unit test
1 parent 538dbc2 commit 4501b8a

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

app/code/Magento/Catalog/Model/Product.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,7 @@ public function priceReindexCallback()
10331033
*/
10341034
public function eavReindexCallback()
10351035
{
1036-
if ($this->isObjectNew() || $this->isDataChanged($this)) {
1036+
if ($this->isObjectNew() || $this->isDataChanged()) {
10371037
$this->_productEavIndexerProcessor->reindexRow($this->getEntityId());
10381038
}
10391039
}
@@ -1168,8 +1168,8 @@ public function setTierPrices(array $tierPrices = null)
11681168
/**
11691169
* Get product tier price for the customer, based on qty of this product
11701170
*
1171-
* @param float $qty
1172-
* @return float|array
1171+
* @param float $qty
1172+
* @return float|array
11731173
*/
11741174
public function getTierPrice($qty = null)
11751175
{
@@ -1179,7 +1179,7 @@ public function getTierPrice($qty = null)
11791179
/**
11801180
* Get formatted by currency product price
11811181
*
1182-
* @return array|double
1182+
* @return array|float
11831183
* @since 102.0.6
11841184
*/
11851185
public function getFormattedPrice()

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -315,10 +315,7 @@ protected function setUp(): void
315315

316316
$contextMock = $this->createPartialMock(
317317
Context::class,
318-
['getEventDispatcher', 'getCacheManager', 'getAppState', 'getActionValidator'],
319-
[],
320-
'',
321-
false
318+
['getEventDispatcher', 'getCacheManager', 'getAppState', 'getActionValidator']
322319
);
323320
$contextMock->expects($this->any())->method('getAppState')->willReturn($this->appStateMock);
324321
$contextMock->expects($this->any())
@@ -621,7 +618,7 @@ public function testGetCategoryCollectionCollectionNull($initCategoryCollection,
621618

622619
$result = $product->getCategoryCollection();
623620

624-
$productIdCachedActual = $this->getPropertyValue($product, '_productIdCached', $productIdCached);
621+
$productIdCachedActual = $this->getPropertyValue($product, '_productIdCached');
625622
$this->assertEquals($getIdResult, $productIdCachedActual);
626623
$this->assertEquals($initCategoryCollection, $result);
627624
}
@@ -1362,6 +1359,7 @@ public function testGetMediaGalleryImagesMerging()
13621359
'url' => 'http://magento.dev/pub/imageFile.jpg',
13631360
'id' => 1,
13641361
'path' => '/var/www/html/pub/imageFile.jpg',
1362+
'position' => 1,
13651363
]
13661364
);
13671365
$expectedSmallImageDataObject = new DataObject(
@@ -1372,6 +1370,7 @@ public function testGetMediaGalleryImagesMerging()
13721370
'url' => 'http://magento.dev/pub/smallImageFile.jpg',
13731371
'id' => 2,
13741372
'path' => '/var/www/html/pub/smallImageFile.jpg',
1373+
'position' => 3,
13751374
]
13761375
);
13771376

0 commit comments

Comments
 (0)