File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ public function validateAddresses(QuoteEntity $quote)
159159 $ quote ->getShippingAddress ()->getCustomerAddressId ()
160160 );
161161 }
162- if (! empty ($ addresses ) && $ quote ->getCustomerIsGuest ()) {
162+ if (empty ($ addresses ) && $ quote ->getCustomerIsGuest () && $ quote -> getBillingAddress ()-> getTelephone ()) {
163163 $ billingAddress = $ quote ->getBillingAddress ();
164164 $ customerAddress = $ this ->customerAddressFactory ->create ();
165165 $ customerAddress ->setFirstname ($ billingAddress ->getFirstname ());
Original file line number Diff line number Diff line change @@ -279,11 +279,11 @@ public function testValidateAddressesNotSavedInAddressBook()
279279 ->getMock ();
280280 $ this ->addressFactoryMock ->expects ($ this ->exactly (1 ))->method ('create ' )->willReturn ($ addressMock );
281281 $ this ->quoteMock
282- ->expects ($ this ->any ())
282+ ->expects ($ this ->atLeastOnce ())
283283 ->method ('getBillingAddress ' )
284284 ->willReturn ($ this ->quoteAddressMock );
285285 $ this ->quoteMock
286- ->expects ($ this ->any ())
286+ ->expects ($ this ->atLeastOnce ())
287287 ->method ('getShippingAddress ' )
288288 ->willReturn ($ this ->quoteAddressMock );
289289 $ validatorMock = $ this ->getMockBuilder (Validator::class)
You can’t perform that action at this time.
0 commit comments