public function NestedMatcherTest::testProviderNoMatch

File

drupal/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/Tests/NestedMatcher/NestedMatcherTest.php, line 113

Class

NestedMatcherTest

Namespace

Symfony\Cmf\Component\Routing\Tests\NestedMatcher

Code

public function testProviderNoMatch() {
  $request = Request::create('/path/one');
  $routeCollection = new RouteCollection();
  $this->provider
    ->expects($this
    ->once())
    ->method('getRouteCollectionForRequest')
    ->with($request)
    ->will($this
    ->returnValue($routeCollection));
  $this->finalMatcher
    ->expects($this
    ->never())
    ->method('finalMatch');
  $matcher = new NestedMatcher($this->provider);
  $matcher
    ->setFinalMatcher($this->finalMatcher);
  $this
    ->setExpectedException('Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException');
  $matcher
    ->matchRequest($request);
}