Skip to content

Commit c29f446

Browse files
committed
MQE-654: Allow easy access to custom/extension attributes values in test
- Static check fixes - composer.json requirement of goaop defined, was causing build failures.
1 parent 5cf7138 commit c29f446

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"sebastian/phpcpd": "~3.0",
2222
"brainmaestro/composer-git-hooks": "^2.3",
2323
"codeception/aspect-mock": "^2.0",
24+
"goaop/framework": "2.1.2",
2425
"codacy/coverage": "^1.4",
2526
"phpmd/phpmd": "^2.6.0",
2627
"rregeer/phpunit-coverage-check": "^0.1.4"

src/Magento/FunctionalTestingFramework/DataGenerator/Persist/DataPersistenceHandler.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -237,13 +237,13 @@ private function convertToFlatArray($arrayIn, $rootKey = '')
237237
* 'attribute_code' => 'code1',
238238
* 'value' => 'value1',
239239
* ],
240-
1 => [
240+
* 1 => [
241241
* 'attribute_code' => 'code2',
242242
* 'value' => 'value2',
243243
* ],
244244
* ]
245245
*
246-
* to
246+
* To
247247
*
248248
* 'custom_attributes' => [
249249
* 'code1' => 'value1',
@@ -256,12 +256,12 @@ private function convertToFlatArray($arrayIn, $rootKey = '')
256256
private function convertCustomAttributesArray($arrayIn)
257257
{
258258
$keys = ['custom_attributes'];
259-
foreach($keys as $key) {
260-
if(!array_key_exists($key, $arrayIn)) {
259+
foreach ($keys as $key) {
260+
if (!array_key_exists($key, $arrayIn)) {
261261
continue;
262262
}
263263
$arrayCopy = $arrayIn[$key];
264-
foreach($arrayCopy as $index => $attributes) {
264+
foreach ($arrayCopy as $index => $attributes) {
265265
$arrayIn[$key][$attributes['attribute_code']] = $attributes['value'];
266266
}
267267
}

0 commit comments

Comments
 (0)