$context =
$this->
getContainer()->
get(SalesChannelContextFactory::
class)->
create(Uuid::
randomHex(), TestDefaults::SALES_CHANNEL
);
$controller =
$this->
getContainer()->
get(ProductController::
class);
if ($shouldThrowException) { static::
expectException(ProductNotFoundException::
class);
} $response =
$controller->
index($context,
$this->
createDetailRequest($context,
$this->ids->
get($requestVariant)));
static::
assertSame(Response::HTTP_OK,
$response->
getStatusCode());
$crawler =
new Crawler();
$crawler->
addHtmlContent((string) $response->
getContent());
$blueFound = false;
$greenFound = false;
$redFound = false;
$xlFound = false;
$lFound = false;
$mFound = false;
$crawler->
filter('.product-detail-configurator .product-detail-configurator-option-label'
) ->
each(static function DCrawler
$option) use ($blue,
$green,
$red,
$xl,
$l, &
$blueFound, &
$greenFound, &
$redFound, &
$xlFound, &
$lFound, &
$mFound): void
{