$products =
$listing['elements'
];
foreach ($products as $product) { static::
assertEquals(['name', 'tax', 'manufacturer', 'id', 'apiAlias'
],
array_keys($product));
static::
assertEquals(['name', 'id', 'apiAlias'
],
array_keys($product['tax'
]));
} } private function assertError(string
$landingPageId): void
{ $response =
json_decode($this->browser->
getResponse()->
getContent(), true, 512, \JSON_THROW_ON_ERROR
);
$error =
new LandingPageNotFoundException($landingPageId);
$expectedError =
[ 'status' =>
(string) $error->
getStatusCode(),
'message' =>
$error->
getMessage(),
];
static::
assertSame($expectedError['status'
],
$response['errors'
][0
]['status'
]);
static::
assertSame($expectedError['message'
],
$response['errors'
][0
]['detail'
]);
} private function createData(array
$override =
[]): void
{