Skip to content

Commit 2fa55d1

Browse files
committed
MAGETWO-56206: API - inconsistency in the Magento response data types
- Compare using buildOutputDataArray instead of __toArray, which isn't in the interface
1 parent c891025 commit 2fa55d1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/View/PersonalInfoTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,11 @@ public function testGetCustomer()
104104
$expectedCustomer,
105105
\Magento\Customer\Api\Data\CustomerInterface::class
106106
);
107-
$actualCustomerData = $this->_block->getCustomer()->__toArray();
107+
$actualCustomer = $this->_block->getCustomer();
108+
$actualCustomerData = $this->_dataObjectProcessor->buildOutputDataArray(
109+
$actualCustomer,
110+
\Magento\Customer\Api\Data\CustomerInterface::class
111+
);
108112
foreach ($expectedCustomerData as $property => $value) {
109113
$expectedValue = is_numeric($value) ? intval($value) : $value;
110114
$actualValue = isset($actualCustomerData[$property]) ? $actualCustomerData[$property] : null;

0 commit comments

Comments
 (0)