public static function getRequestTestCaseProvider(): array
{ $config =
[ 'https' =>
[false, true
],
'host' =>
['router.test', 'router.test:8000'
],
'subDir' =>
['', '/public', '/sw/public'
],
'salesChannel' =>
['', '/de', '/de/premium', '/public'
],
];
$cases = self::
generateCases(array_keys($config),
$config);
return array_map(fn ($params) =>
[self::
createCase($params['https'
],
$params['host'
],
$params['subDir'
],
$params['salesChannel'
])],
$cases);
} private function getContext(Request
$request): RequestContext
{ return new RequestContext( $request->
getBaseUrl(),
$request->
getMethod(),
$request->
getHost(),
$request->
getScheme(),
(!
$request->
isSecure() &&
$request->
getPort() !== 80
) ?
$request->
getPort() : 80,
($request->
isSecure() &&
$request->
getPort() !== 443
) ?
$request->
getPort() : 443,