Confirms the final matcher returns correct attributes for pattern paths.
public function testFinalMatcherPattern() {
$collection = new RouteCollection();
$collection
->add('route_a', new Route('/path/one/{value}', array(
'_controller' => 'foo',
)));
$request = Request::create('/path/one/narf', 'GET');
$request->attributes
->set('system_path', 'path/one/narf');
$matcher = new FirstEntryFinalMatcher();
$matcher
->setCollection($collection);
$attributes = $matcher
->matchRequest($request);
$this
->assertEqual($attributes['_route']
->getOption('_name'), 'route_a', 'The correct matching route was found.');
$this
->assertEqual($attributes['_controller'], 'foo', 'The correct controller was found.');
$this
->assertEqual($attributes['value'], 'narf', 'Required placeholder value found.');
}