File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
app/code/Magento/Quote/Test/Unit/Model Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -247,6 +247,7 @@ protected function setUp(): void
247
247
'getPayment ' ,
248
248
'setCheckoutMethod ' ,
249
249
'setCustomerIsGuest ' ,
250
+ 'getCustomer ' ,
250
251
'getId '
251
252
]
252
253
)
@@ -799,6 +800,12 @@ public function testPlaceOrderIfCustomerIsGuest()
799
800
$ this ->quoteMock ->expects ($ this ->once ())
800
801
->method ('getCheckoutMethod ' )
801
802
->willReturn (Onepage::METHOD_GUEST );
803
+ $ customerMock = $ this ->getMockBuilder (Customer::class)
804
+ ->disableOriginalConstructor ()
805
+ ->getMock ();
806
+ $ this ->quoteMock ->expects ($ this ->once ())
807
+ ->method ('getCustomer ' )
808
+ ->willReturn ($ customerMock );
802
809
$ this ->quoteMock ->expects ($ this ->once ())->method ('setCustomerId ' )->with (null )->willReturnSelf ();
803
810
$ this ->quoteMock ->expects ($ this ->once ())->method ('setCustomerEmail ' )->with ($ email )->willReturnSelf ();
804
811
@@ -866,6 +873,9 @@ public function testPlaceOrderIfCustomerIsGuest()
866
873
$ this ->assertEquals ($ orderId , $ service ->placeOrder ($ cartId ));
867
874
}
868
875
876
+ /**
877
+ * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
878
+ */
869
879
public function testPlaceOrder ()
870
880
{
871
881
$ cartId = 323 ;
You can’t perform that action at this time.
0 commit comments