Skip to content

Commit 4428976

Browse files
committed
ACP2E-1736: Customer Addresses Export is not working with empty multi-area text field
modified test unit for code coverage
1 parent 299d5cc commit 4428976

File tree

1 file changed

+11
-2
lines changed
  • app/code/Magento/CustomerImportExport/Test/Unit/Model/Export

1 file changed

+11
-2
lines changed

app/code/Magento/CustomerImportExport/Test/Unit/Model/Export/AddressTest.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,13 @@ class AddressTest extends TestCase
5252
*
5353
* @var array
5454
*/
55-
protected $_attributes = [['attribute_id' => 1, 'attribute_code' => self::ATTRIBUTE_CODE]];
55+
protected $_attributes = [
56+
[
57+
'attribute_id' => 1,
58+
'attribute_code' => self::ATTRIBUTE_CODE,
59+
'frontend_input' => 'multiselect'
60+
]
61+
];
5662

5763
/**
5864
* Customer data
@@ -166,8 +172,11 @@ protected function _getModelDependencies()
166172
true,
167173
true,
168174
true,
169-
['_construct']
175+
['_construct', 'getSource']
170176
);
177+
178+
$attributeSource = $this->createMock(\Magento\Eav\Model\Entity\Attribute\Source\AbstractSource::class);
179+
$attribute->expects($this->once())->method('getSource')->willReturn($attributeSource);
171180
$attributeCollection->addItem($attribute);
172181
}
173182

0 commit comments

Comments
 (0)