if ($loginRequired) { $request->attributes->
set(PlatformRequest::ATTRIBUTE_LOGIN_REQUIRED,
$loginRequired);
} if ($context) { $salesChannelResolver->
resolve($request);
} $exception = null;
try { $generator =
$resolver->
resolve($request,
new ArgumentMetadata('', CustomerEntity::
class, false, false, ''
));
if ($generator instanceof \Traversable
) { iterator_to_array($generator);
} } catch (\Exception
$e) { $exception =
$e;
} if ($pass) { static::
assertNull($exception, 'Exception: ' .
($exception !== null ?
print_r($exception->
getMessage(), true
) : 'No Exception'
));
} else { static::
assertInstanceOf(\RuntimeException::
class,
$exception, 'Exception: ' .
($exception !== null ?
print_r($exception->
getMessage(), true
) : 'No Exception'
));
}