File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed
app/code/Magento/Customer/Model/Data
dev/tests/integration/testsuite/Magento/Customer/Model/ResourceModel Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ public function __construct(
42
42
}
43
43
44
44
/**
45
- * { @inheritdoc}
45
+ * @inheritdoc
46
46
*/
47
47
protected function getCustomAttributesCodes ()
48
48
{
@@ -452,7 +452,7 @@ public function setIsDefaultBilling($isDefaultBilling)
452
452
}
453
453
454
454
/**
455
- * { @inheritdoc}
455
+ * @inheritdoc
456
456
*
457
457
* @return \Magento\Customer\Api\Data\AddressExtensionInterface|null
458
458
*/
@@ -462,7 +462,7 @@ public function getExtensionAttributes()
462
462
}
463
463
464
464
/**
465
- * { @inheritdoc}
465
+ * @inheritdoc
466
466
*
467
467
* @param \Magento\Customer\Api\Data\AddressExtensionInterface $extensionAttributes
468
468
* @return $this
Original file line number Diff line number Diff line change @@ -571,4 +571,20 @@ private function getWebsite(string $code): WebsiteInterface
571
571
$ repository = $ this ->objectManager ->get (WebsiteRepositoryInterface::class);
572
572
return $ repository ->get ($ code );
573
573
}
574
+
575
+ /**
576
+ * Test for saving address with extra spaces in phone.
577
+ *
578
+ * @magentoDataFixture Magento/Customer/_files/customer.php
579
+ * @magentoDataFixture Magento/Customer/_files/customer_address.php
580
+ */
581
+ public function testSaveNewAddressWithExtraSpacesInPhone ()
582
+ {
583
+ $ proposedAddress = $ this ->_createSecondAddress ()
584
+ ->setCustomerId (1 )
585
+ ->setTelephone (' 123456 ' );
586
+ $ returnedAddress = $ this ->repository ->save ($ proposedAddress );
587
+ $ savedAddress = $ this ->repository ->getById ($ returnedAddress ->getId ());
588
+ $ this ->assertEquals ('123456 ' , $ savedAddress ->getTelephone ());
589
+ }
574
590
}
You can’t perform that action at this time.
0 commit comments