Skip to content

Commit

Permalink
Fix Behat (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
lruozzi9 committed Nov 17, 2023
1 parent a984b5e commit 7f54da7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/InMemory/Client/Api/InMemoryAttributeOptionApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ public function listPerPage($attributeCode, $limit = 100, $withCount = false, ar
public function all($attributeCode, $pageSize = 10, array $queryParameters = []): ResourceCursorInterface
{
$attributeOptions = [];
foreach (self::$attributeOptions[$attributeCode] as $attributeOption) {
$attributeOptions[] = $attributeOption->__serialize();
if (array_key_exists($attributeCode, self::$attributeOptions)) {
foreach (self::$attributeOptions[$attributeCode] as $attributeOption) {
$attributeOptions[] = $attributeOption->__serialize();
}
}

return new class(new ArrayIterator($attributeOptions), $pageSize) implements ResourceCursorInterface {
Expand Down

0 comments on commit 7f54da7

Please sign in to comment.