Skip to content

Commit 4e48a7a

Browse files
committed
MC-38592 Fixed code styles of unit tests
1 parent 228cb68 commit 4e48a7a

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

app/code/Magento/Directory/Test/Unit/Helper/DataTest.php

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -242,20 +242,17 @@ public function testGetRegionJson(?int $currentStoreId, array $allowedCountries,
242242
[Data::XML_PATH_STATES_REQUIRED, ScopeInterface::SCOPE_STORE, null, '']
243243
]
244244
);
245+
245246
$regions = [
246-
new DataObject(
247-
['country_id' => 'Country1', 'region_id' => 'r1', 'code' => 'r1-code', 'name' => 'r1-name']
248-
),
249-
new DataObject(
250-
['country_id' => 'Country1', 'region_id' => 'r2', 'code' => 'r2-code', 'name' => 'r2-name']
251-
),
252-
new DataObject(
253-
['country_id' => 'Country2', 'region_id' => 'r3', 'code' => 'r3-code', 'name' => 'r3-name']
254-
)
247+
new DataObject(['country_id' => 'Country1', 'region_id' => 'r1', 'code' => 'r1-code', 'name' => 'r1-name']),
248+
new DataObject(['country_id' => 'Country1', 'region_id' => 'r2', 'code' => 'r2-code', 'name' => 'r2-name']),
249+
new DataObject(['country_id' => 'Country2', 'region_id' => 'r3', 'code' => 'r3-code', 'name' => 'r3-name']),
255250
];
256-
$regionIterator = new ArrayIterator(array_filter($regions, function(DataObject $region) use ($allowedCountries) {
251+
$regions = array_filter($regions, function (DataObject $region) use ($allowedCountries) {
257252
return array_key_exists($region->getData('country_id'), $allowedCountries);
258-
}));
253+
});
254+
255+
$regionIterator = new ArrayIterator($regions);
259256

260257
$this->_regionCollection->expects(
261258
$this->once()

0 commit comments

Comments
 (0)