Skip to content

Commit cbd470b

Browse files
author
Valeriy Nayda
committed
GraphQL-122: API-functional tests: assertResponseFields moved to the abstract class
1 parent 16c17ba commit cbd470b

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/CategoryProductsVariantsTest.php

-24
Original file line numberDiff line numberDiff line change
@@ -74,28 +74,4 @@ private function assertSimpleProductFields($product, $actualResponse)
7474

7575
$this->assertResponseFields($actualResponse, $assertionMap);
7676
}
77-
78-
/**
79-
* @param array $actualResponse
80-
* @param array $assertionMap
81-
*/
82-
private function assertResponseFields($actualResponse, $assertionMap)
83-
{
84-
foreach ($assertionMap as $key => $assertionData) {
85-
$expectedValue = isset($assertionData['expected_value'])
86-
? $assertionData['expected_value']
87-
: $assertionData;
88-
$responseField = isset($assertionData['response_field']) ? $assertionData['response_field'] : $key;
89-
self::assertNotNull(
90-
$expectedValue,
91-
"Value of '{$responseField}' field must not be NULL"
92-
);
93-
self::assertEquals(
94-
$expectedValue,
95-
$actualResponse[$responseField],
96-
"Value of '{$responseField}' field in response does not match expected value: "
97-
. var_export($expectedValue, true)
98-
);
99-
}
100-
}
10177
}

0 commit comments

Comments
 (0)