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(
60
60
61
61
/**
62
62
* Update quote item qty.
63
+ *
63
64
* Custom price is updated in case 'custom_price' value exists
64
65
*
65
66
* @param Item $item
@@ -145,8 +146,8 @@ protected function unsetCustomPrice(Item $item)
145
146
$ item ->addOption ($ infoBuyRequest );
146
147
}
147
148
148
- $ item ->unsetData ('custom_price ' );
149
- $ item ->unsetData ('original_custom_price ' );
149
+ $ item ->setData ('custom_price ' , null );
150
+ $ item ->setData ('original_custom_price ' , null );
150
151
}
151
152
152
153
/**
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ protected function setUp()
67
67
'addOption ' ,
68
68
'setCustomPrice ' ,
69
69
'setOriginalCustomPrice ' ,
70
- ' unsetData ' ,
70
+ ' setData ' ,
71
71
'hasData ' ,
72
72
'setIsQtyDecimal '
73
73
]);
@@ -353,7 +353,11 @@ public function testUpdateUnsetCustomPrice()
353
353
->will ($ this ->returnValue ($ buyRequestMock ));
354
354
355
355
$ this ->itemMock ->expects ($ this ->exactly (2 ))
356
- ->method ('unsetData ' );
356
+ ->method ('setData ' )
357
+ ->withConsecutive (
358
+ ['custom_price ' , null ],
359
+ ['original_custom_price ' , null ]
360
+ );
357
361
358
362
$ this ->itemMock ->expects ($ this ->once ())
359
363
->method ('hasData ' )
You can’t perform that action at this time.
0 commit comments