if ($container->
hasDefinition('path_alias.path_processor'
)) { $definition =
$container->
getDefinition('path_alias.path_processor'
);
$definition->
addTag('path_processor_inbound',
['priority' => 100
])->
addTag('path_processor_outbound',
['priority' => 300
]);
} } /**
* Tests the content negotiation aspect of routing.
*/
public function testContentRouting() { // Alias with extension pointing to no extension/constant content-type.
$this->
createPathAlias('/conneg/html', '/alias.html'
);
// Alias with extension pointing to dynamic extension/linked content-type.
$this->
createPathAlias('/conneg/html?_format=json', '/alias.json'
);
$tests =
[ // ['path', 'accept', 'content-type'],
// Extension is part of the route path. Constant Content-type.
['conneg/simple.json', '', 'application/json'
],
['conneg/simple.json', 'application/xml', 'application/json'
],
['conneg/simple.json', 'application/json', 'application/json'
],