File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
Test/Unit/Model/Quote/Item Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ public function __construct(
6060
6161 /**
6262 * Update quote item qty.
63+ *
6364 * Custom price is updated in case 'custom_price' value exists
6465 *
6566 * @param Item $item
@@ -145,8 +146,8 @@ protected function unsetCustomPrice(Item $item)
145146 $ item ->addOption ($ infoBuyRequest );
146147 }
147148
148- $ item ->unsetData ('custom_price ' );
149- $ item ->unsetData ('original_custom_price ' );
149+ $ item ->setData ('custom_price ' , null );
150+ $ item ->setData ('original_custom_price ' , null );
150151 }
151152
152153 /**
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ protected function setUp()
6767 'addOption ' ,
6868 'setCustomPrice ' ,
6969 'setOriginalCustomPrice ' ,
70- ' unsetData ' ,
70+ ' setData ' ,
7171 'hasData ' ,
7272 'setIsQtyDecimal '
7373 ]);
@@ -353,7 +353,11 @@ public function testUpdateUnsetCustomPrice()
353353 ->will ($ this ->returnValue ($ buyRequestMock ));
354354
355355 $ this ->itemMock ->expects ($ this ->exactly (2 ))
356- ->method ('unsetData ' );
356+ ->method ('setData ' )
357+ ->withConsecutive (
358+ ['custom_price ' , null ],
359+ ['original_custom_price ' , null ]
360+ );
357361
358362 $ this ->itemMock ->expects ($ this ->once ())
359363 ->method ('hasData ' )
You can’t perform that action at this time.
0 commit comments