merged branch Tobion/eager (PR #4562)

Commits
-------

49e9957 added test to ensure matching is eager

Discussion
----------

[Routing] added test to ensure matching is eager

This just adds a passing test that wasn't covered yet, so we don't break this scenario in the future.

---------------------------------------------------------------------------

by travisbot at 2012-06-13T01:04:09Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1605738) (merged 49e99572 into 37550d23).
This commit is contained in:
Fabien Potencier 2012-06-13 08:18:21 +02:00
commit f5c99d2421

View File

@ -214,6 +214,15 @@ class UrlMatcherTest extends \PHPUnit_Framework_TestCase
}
}
public function testMatchingIsEager()
{
$coll = new RouteCollection();
$coll->add('test', new Route('/{foo}-{bar}-', array(), array('foo' => '.+', 'bar' => '.+')));
$matcher = new UrlMatcher($coll, new RequestContext());
$this->assertEquals(array('foo' => 'text1-text2-text3', 'bar' => 'text4', '_route' => 'test'), $matcher->match('/text1-text2-text3-text4-'));
}
/**
* @expectedException Symfony\Component\Routing\Exception\ResourceNotFoundException
*/