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
128
128
['entity_id ' , $ originalProductId ]
129
129
]
130
130
);
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 ));
131
137
$ product ->expects ($ this ->atLeastOnce ())->method ('getStoreId ' )->willReturn (0 );
132
138
$ product ->expects ($ this ->atLeastOnce ())->method ('setData ' )->with ('tier_price_changed ' , 1 );
133
139
$ store = $ this ->getMockBuilder (\Magento \Store \Api \Data \StoreInterface::class)
@@ -163,7 +169,6 @@ public function testExecute(): void
163
169
$ this ->tierPriceResource ->expects ($ this ->exactly (2 ))->method ('savePriceData ' )->willReturnSelf ();
164
170
$ this ->tierPriceResource ->expects ($ this ->once ())->method ('deletePriceData ' )
165
171
->with ($ productId , null , $ priceIdToDelete );
166
-
167
172
$ this ->assertEquals ($ product , $ this ->updateHandler ->execute ($ product ));
168
173
}
169
174
You can’t perform that action at this time.
0 commit comments