Skip to content

Commit a0d62ec

Browse files
author
Michael Logvin
committed
MAGETWO-37614: Stabilize story
1 parent 13c82ec commit a0d62ec

File tree

1 file changed

+5
-8
lines changed
  • dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import

1 file changed

+5
-8
lines changed

dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import/AddressTest.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -335,14 +335,11 @@ public function testSaveCustomerDefaults()
335335
$customerId = $addressCustomer->getId();
336336

337337
// set customer defaults
338-
$defaults = [];
339-
foreach (Address::getDefaultAddressAttributeMapping() as $attributeCode) {
340-
/** @var $attribute \Magento\Eav\Model\Entity\Attribute\AbstractAttribute */
341-
$attribute = $addressCustomer->getAttribute($attributeCode);
342-
$attributeTable = $attribute->getBackend()->getTable();
343-
$attributeId = $attribute->getId();
344-
$defaults[$attributeTable][$customerId][$attributeId] = $addressId;
345-
}
338+
$defaults = [
339+
'customer_entity' => [
340+
$customerId => ['default_billing' => $addressId, 'default_shipping' => $addressId],
341+
],
342+
];
346343

347344
// invoke _saveCustomerDefaults
348345
$saveDefaults = new \ReflectionMethod($this->_testClassName, '_saveCustomerDefaults');

0 commit comments

Comments
 (0)