@@ -136,7 +136,7 @@ public function testSetVirtualProduct()
136136
137137 $ quoteMock = $ this ->getMockBuilder (Quote::class)
138138 ->addMethods (['setTotalsCollectedFlag ' ])
139- ->onlyMethods (['getPayment ' , 'isVirtual ' , 'getBillingAddress ' , 'collectTotals ' ])
139+ ->onlyMethods (['getPayment ' , 'isVirtual ' , 'getBillingAddress ' , 'collectTotals ' , ' save ' ])
140140 ->disableOriginalConstructor ()
141141 ->getMock ();
142142 $ this ->quoteRepositoryMock ->expects ($ this ->once ())->method ('get ' )->with ($ cartId )->willReturn ($ quoteMock );
@@ -189,7 +189,7 @@ public function testSetVirtualProduct()
189189 ->willReturn (true );
190190
191191 $ 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 ( );
193193
194194 $ paymentMock ->expects ($ this ->once ())->method ('getId ' )->willReturn ($ paymentId );
195195 $ this ->assertEquals ($ paymentId , $ this ->model ->set ($ cartId , $ methodMock ));
@@ -267,7 +267,7 @@ public function testSetSimpleProduct()
267267
268268 $ quoteMock = $ this ->getMockBuilder (Quote::class)
269269 ->addMethods (['setTotalsCollectedFlag ' ])
270- ->onlyMethods (['getPayment ' , 'isVirtual ' , 'getShippingAddress ' , 'collectTotals ' ])
270+ ->onlyMethods (['getPayment ' , 'isVirtual ' , 'getShippingAddress ' , 'collectTotals ' , ' save ' ])
271271 ->disableOriginalConstructor ()
272272 ->getMock ();
273273 $ this ->quoteRepositoryMock ->expects ($ this ->once ())->method ('get ' )->with ($ cartId )->willReturn ($ quoteMock );
@@ -324,7 +324,7 @@ public function testSetSimpleProduct()
324324 ->willReturn (true );
325325
326326 $ 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 ( );
328328
329329 $ paymentMock ->expects ($ this ->once ())->method ('getId ' )->willReturn ($ paymentId );
330330 $ this ->assertEquals ($ paymentId , $ this ->model ->set ($ cartId , $ methodMock ));
0 commit comments