File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
app/code/Magento/Catalog/Test/Unit/Model/Attribute/Backend/TierPrice Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,12 @@ public function testExecute(): void
128128 ['entity_id ' , $ originalProductId ]
129129 ]
130130 );
131+ $ this ->assertEquals ($ this ->assertNotNull ($ newTierPrices [0 ]['price ' ]),
132+ $ this ->tierPriceResource ->expects ($ this ->atLeastOnce ())
133+ ->method ('updateValues ' )->with ($ newTierPrices , $ originalTierPrices )->willReturn (true ));
134+ $ this ->assertEquals ($ this ->assertNull ($ newTierPrices [0 ]['price ' ]),
135+ $ this ->tierPriceResource ->expects ($ this ->atLeastOnce ())
136+ ->method ('updateValues ' )->with ($ newTierPrices , $ originalTierPrices )->willReturn (false ));
131137 $ product ->expects ($ this ->atLeastOnce ())->method ('getStoreId ' )->willReturn (0 );
132138 $ product ->expects ($ this ->atLeastOnce ())->method ('setData ' )->with ('tier_price_changed ' , 1 );
133139 $ store = $ this ->getMockBuilder (\Magento \Store \Api \Data \StoreInterface::class)
@@ -163,7 +169,6 @@ public function testExecute(): void
163169 $ this ->tierPriceResource ->expects ($ this ->exactly (2 ))->method ('savePriceData ' )->willReturnSelf ();
164170 $ this ->tierPriceResource ->expects ($ this ->once ())->method ('deletePriceData ' )
165171 ->with ($ productId , null , $ priceIdToDelete );
166-
167172 $ this ->assertEquals ($ product , $ this ->updateHandler ->execute ($ product ));
168173 }
169174
You can’t perform that action at this time.
0 commit comments