$context =
$this->
getContext($transformedRequest);
$this->router->
setContext($context);
$absolutePath =
$this->router->
generate($case->route
);
$absoluteUrl =
$this->router->
generate($case->route,
[], Router::ABSOLUTE_URL
);
$networkPath =
$this->router->
generate($case->route,
[], Router::NETWORK_PATH
);
$pathInfo =
$this->router->
generate($case->route,
[], Router::PATH_INFO
);
static::
assertSame($case->
getAbsolutePath(),
$absolutePath,
var_export($case, true
));
static::
assertSame($case->
getAbsoluteUrl(),
$absoluteUrl,
var_export($case, true
));
static::
assertSame($case->
getNetworkPath(),
$networkPath,
var_export($case, true
));
static::
assertSame($case->
getPathInfo(),
$pathInfo,
var_export($case, true
));
$matches =
$this->router->
matchRequest($transformedRequest);
static::
assertEquals($case->route,
$matches['_route'
]);
$matches =
$this->router->
match($transformedRequest->
getPathInfo());
static::
assertEquals($case->route,
$matches['_route'
]);
// test seo url generation
$host =
$transformedRequest->attributes->
get(RequestTransformer::SALES_CHANNEL_ABSOLUTE_BASE_URL
) .
$transformedRequest->attributes->
get(RequestTransformer::SALES_CHANNEL_BASE_URL
);