// Create the processor manager and add the processors.
$processor_manager =
new PathProcessorManager();
foreach ($priorities as $priority =>
$processor) { $processor_manager->
addInbound($processor,
$priority);
} // Test resolving the French homepage using the incorrect processor order.
$test_path = '/fr';
$request = Request::
create($test_path);
$processed =
$processor_manager->
processInbound($test_path,
$request);
$this->
assertEquals('/',
$processed, 'Processing in the incorrect order fails to resolve the system path from the empty path'
);
// Test resolving an existing alias using the incorrect processor order.
$test_path = '/fr/foo';
$request = Request::
create($test_path);
$processed =
$processor_manager->
processInbound($test_path,
$request);
$this->
assertEquals('/foo',
$processed, 'Processing in the incorrect order fails to resolve the system path from an alias'
);
// Now create a new processor manager and add the processors, this time in
// the correct order.
$processor_manager =
new PathProcessorManager();