File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
app/code/Magento/CustomerImportExport/Model/Import
dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -645,7 +645,7 @@ protected function _prepareDataForUpdate(array $rowData): array
645645 $ value = $ rowData [$ attributeAlias ];
646646
647647 if (!strlen ($ rowData [$ attributeAlias ])) {
648- if (! $ newAddress ) {
648+ if ($ attributeParams [ ' is_required ' ] ) {
649649 continue ;
650650 }
651651
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ class AddressTest extends TestCase
8080 'remove ' => [ // this data is not set in CSV file
8181 '19107 ' => [
8282 'city ' => 'Philadelphia ' ,
83- 'region ' => ' Pennsylvania ' ,
83+ 'region ' => null ,
8484 ],
8585 ],
8686 'default ' => [ // new default billing/shipping addresses
@@ -568,9 +568,10 @@ public function testUpdateFirstAndLastName()
568568 $ this ->assertEquals ($ address ->getStreet (), $ updatedAddress ->getStreet ());
569569 $ this ->assertEquals ($ address ->getCity (), $ updatedAddress ->getCity ());
570570 $ this ->assertEquals ($ address ->getCountryId (), $ updatedAddress ->getCountryId ());
571- $ this ->assertEquals ($ address ->getPostcode (), $ updatedAddress ->getPostcode ());
572571 $ this ->assertEquals ($ address ->getTelephone (), $ updatedAddress ->getTelephone ());
573572 $ this ->assertEquals ($ address ->getRegionId (), $ updatedAddress ->getRegionId ());
573+ //assert empty non-required values changed
574+ $ this ->assertEquals (null , $ updatedAddress ->getPostcode ());
574575 }
575576
576577 /**
You can’t perform that action at this time.
0 commit comments