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)
159
159
$ quote ->getShippingAddress ()->getCustomerAddressId ()
160
160
);
161
161
}
162
- if (! empty ($ addresses ) && $ quote ->getCustomerIsGuest ()) {
162
+ if (empty ($ addresses ) && $ quote ->getCustomerIsGuest () && $ quote -> getBillingAddress ()-> getTelephone ()) {
163
163
$ billingAddress = $ quote ->getBillingAddress ();
164
164
$ customerAddress = $ this ->customerAddressFactory ->create ();
165
165
$ customerAddress ->setFirstname ($ billingAddress ->getFirstname ());
Original file line number Diff line number Diff line change @@ -279,11 +279,11 @@ public function testValidateAddressesNotSavedInAddressBook()
279
279
->getMock ();
280
280
$ this ->addressFactoryMock ->expects ($ this ->exactly (1 ))->method ('create ' )->willReturn ($ addressMock );
281
281
$ this ->quoteMock
282
- ->expects ($ this ->any ())
282
+ ->expects ($ this ->atLeastOnce ())
283
283
->method ('getBillingAddress ' )
284
284
->willReturn ($ this ->quoteAddressMock );
285
285
$ this ->quoteMock
286
- ->expects ($ this ->any ())
286
+ ->expects ($ this ->atLeastOnce ())
287
287
->method ('getShippingAddress ' )
288
288
->willReturn ($ this ->quoteAddressMock );
289
289
$ validatorMock = $ this ->getMockBuilder (Validator::class)
You can’t perform that action at this time.
0 commit comments