@@ -136,7 +136,7 @@ public function testSetVirtualProduct()
136
136
137
137
$ quoteMock = $ this ->getMockBuilder (Quote::class)
138
138
->addMethods (['setTotalsCollectedFlag ' ])
139
- ->onlyMethods (['getPayment ' , 'isVirtual ' , 'getBillingAddress ' , 'collectTotals ' ])
139
+ ->onlyMethods (['getPayment ' , 'isVirtual ' , 'getBillingAddress ' , 'collectTotals ' , ' save ' ])
140
140
->disableOriginalConstructor ()
141
141
->getMock ();
142
142
$ this ->quoteRepositoryMock ->expects ($ this ->once ())->method ('get ' )->with ($ cartId )->willReturn ($ quoteMock );
@@ -189,7 +189,7 @@ public function testSetVirtualProduct()
189
189
->willReturn (true );
190
190
191
191
$ quoteMock ->expects ($ this ->once ())->method ('setTotalsCollectedFlag ' )->with (false )->willReturnSelf ();
192
- $ this -> quoteRepositoryMock -> expects ($ this ->once ())->method ('save ' )->with ( $ quoteMock );
192
+ $ quoteMock -> expects ($ this ->once ())->method ('save ' )->willReturnSelf ( );
193
193
194
194
$ paymentMock ->expects ($ this ->once ())->method ('getId ' )->willReturn ($ paymentId );
195
195
$ this ->assertEquals ($ paymentId , $ this ->model ->set ($ cartId , $ methodMock ));
@@ -267,7 +267,7 @@ public function testSetSimpleProduct()
267
267
268
268
$ quoteMock = $ this ->getMockBuilder (Quote::class)
269
269
->addMethods (['setTotalsCollectedFlag ' ])
270
- ->onlyMethods (['getPayment ' , 'isVirtual ' , 'getShippingAddress ' , 'collectTotals ' ])
270
+ ->onlyMethods (['getPayment ' , 'isVirtual ' , 'getShippingAddress ' , 'collectTotals ' , ' save ' ])
271
271
->disableOriginalConstructor ()
272
272
->getMock ();
273
273
$ this ->quoteRepositoryMock ->expects ($ this ->once ())->method ('get ' )->with ($ cartId )->willReturn ($ quoteMock );
@@ -324,7 +324,7 @@ public function testSetSimpleProduct()
324
324
->willReturn (true );
325
325
326
326
$ quoteMock ->expects ($ this ->once ())->method ('setTotalsCollectedFlag ' )->with (false )->willReturnSelf ();
327
- $ this -> quoteRepositoryMock -> expects ($ this ->once ())->method ('save ' )->with ( $ quoteMock );
327
+ $ quoteMock -> expects ($ this ->once ())->method ('save ' )->willReturnSelf ( );
328
328
329
329
$ paymentMock ->expects ($ this ->once ())->method ('getId ' )->willReturn ($ paymentId );
330
330
$ this ->assertEquals ($ paymentId , $ this ->model ->set ($ cartId , $ methodMock ));
0 commit comments