File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
app/code/Magento/SalesRule/Test/Unit/Model Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -177,10 +177,7 @@ public function testApplyRulesFilterWithRulesList()
177
177
178
178
$ this ->selectMock ->expects ($ this ->at (3 ))
179
179
->method ('where ' )
180
- ->with (implode ([
181
- 'test_1 ' ,
182
- 'test_2 ' ,
183
- ], ' OR ' ));
180
+ ->with (implode (' OR ' , ['test_1 ' , 'test_2 ' ]));
184
181
185
182
$ ruleMock = $ this ->getRuleMock ();
186
183
$ ruleMock ->expects ($ this ->once ())
Original file line number Diff line number Diff line change @@ -118,6 +118,12 @@ protected function setUp(): void
118
118
*/
119
119
public function testCalculate ()
120
120
{
121
+ $ ruleItemTotals = [
122
+ 'items_price ' => 100 ,
123
+ 'base_items_price ' => 100 ,
124
+ 'items_count ' => 1 ,
125
+ ];
126
+
121
127
$ this ->rule ->setData (['id ' => 1 , 'discount_amount ' => 10.0 ]);
122
128
123
129
$ this ->quote ->expects ($ this ->any ())->method ('getCartFixedRules ' )->willReturn ([]);
@@ -126,6 +132,11 @@ public function testCalculate()
126
132
$ this ->priceCurrency ->expects ($ this ->atLeastOnce ())->method ('round ' )->willReturnArgument (0 );
127
133
$ this ->quote ->expects ($ this ->any ())->method ('getStore ' )->willReturn ($ store );
128
134
135
+ $ this ->validator ->expects ($ this ->once ())
136
+ ->method ('getRuleItemTotalsInfo ' )
137
+ ->with ($ this ->rule ->getId ())
138
+ ->willReturn ($ ruleItemTotals );
139
+
129
140
/** validators data */
130
141
$ this ->validator ->expects (
131
142
$ this ->once ()
You can’t perform that action at this time.
0 commit comments