Skip to content

Commit

Permalink
magento/graphql-ce#761: [Customizable Options] Call to a member funct…
Browse files Browse the repository at this point in the history
…ion format() on boolean
  • Loading branch information
lenaorobei committed Oct 14, 2019
1 parent facce4c commit 7653126
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,14 @@ public function testAddDownloadableProductWithOptions()
self::assertCount($qty, $response['addDownloadableProductsToCart']['cart']);
$customizableOptionsOutput =
$response['addDownloadableProductsToCart']['cart']['items'][0]['customizable_options'];
$assignedOptionsCount = count($customOptionsValues);
for ($counter = 0; $counter < $assignedOptionsCount; $counter++) {
$expectedValues = $this->buildExpectedValuesArray($customOptionsValues[$counter]['value_string']);
$count = 0;
foreach ($customOptionsValues as $value) {
$expectedValues = $this->buildExpectedValuesArray($value['value_string']);
self::assertEquals(
$expectedValues,
$customizableOptionsOutput[$counter]['values']
$customizableOptionsOutput[$count]['values']
);
$count++;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,14 @@ public function testAddVirtualProductWithOptions()
self::assertCount(1, $response['addVirtualProductsToCart']['cart']);

$customizableOptionsOutput = $response['addVirtualProductsToCart']['cart']['items'][0]['customizable_options'];
$assignedOptionsCount = count($customOptionsValues);
for ($counter = 0; $counter < $assignedOptionsCount; $counter++) {
$expectedValues = $this->buildExpectedValuesArray($customOptionsValues[$counter]['value_string']);
$count = 0;
foreach ($customOptionsValues as $value) {
$expectedValues = $this->buildExpectedValuesArray($value['value_string']);
self::assertEquals(
$expectedValues,
$customizableOptionsOutput[$counter]['values']
$customizableOptionsOutput[$count]['values']
);
$count++;
}
}

Expand Down

0 comments on commit 7653126

Please sign in to comment.