Skip to content

Commit

Permalink
merged branch Tobion/eager (PR #4562)
Browse files Browse the repository at this point in the history
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 49e9957 into 37550d2).
  • Loading branch information
fabpot committed Jun 13, 2012
2 parents 47cd378 + 49e9957 commit f5c99d2
Showing 1 changed file with 9 additions and 0 deletions.
Expand Up @@ -214,6 +214,15 @@ public function testMatchRegression()
}
}

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
*/
Expand Down

0 comments on commit f5c99d2

Please sign in to comment.