Skip to content

Commit 7653126

Browse files
committed
magento/graphql-ce#761: [Customizable Options] Call to a member function format() on boolean
1 parent facce4c commit 7653126

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/AddDownloadableProductWithCustomOptionsToCartTest.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,14 @@ public function testAddDownloadableProductWithOptions()
7272
self::assertCount($qty, $response['addDownloadableProductsToCart']['cart']);
7373
$customizableOptionsOutput =
7474
$response['addDownloadableProductsToCart']['cart']['items'][0]['customizable_options'];
75-
$assignedOptionsCount = count($customOptionsValues);
76-
for ($counter = 0; $counter < $assignedOptionsCount; $counter++) {
77-
$expectedValues = $this->buildExpectedValuesArray($customOptionsValues[$counter]['value_string']);
75+
$count = 0;
76+
foreach ($customOptionsValues as $value) {
77+
$expectedValues = $this->buildExpectedValuesArray($value['value_string']);
7878
self::assertEquals(
7979
$expectedValues,
80-
$customizableOptionsOutput[$counter]['values']
80+
$customizableOptionsOutput[$count]['values']
8181
);
82+
$count++;
8283
}
8384
}
8485

dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/AddVirtualProductWithCustomOptionsToCartTest.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,14 @@ public function testAddVirtualProductWithOptions()
7272
self::assertCount(1, $response['addVirtualProductsToCart']['cart']);
7373

7474
$customizableOptionsOutput = $response['addVirtualProductsToCart']['cart']['items'][0]['customizable_options'];
75-
$assignedOptionsCount = count($customOptionsValues);
76-
for ($counter = 0; $counter < $assignedOptionsCount; $counter++) {
77-
$expectedValues = $this->buildExpectedValuesArray($customOptionsValues[$counter]['value_string']);
75+
$count = 0;
76+
foreach ($customOptionsValues as $value) {
77+
$expectedValues = $this->buildExpectedValuesArray($value['value_string']);
7878
self::assertEquals(
7979
$expectedValues,
80-
$customizableOptionsOutput[$counter]['values']
80+
$customizableOptionsOutput[$count]['values']
8181
);
82+
$count++;
8283
}
8384
}
8485

0 commit comments

Comments
 (0)