You are here

public function NestedMatcherTest::testProviderNoMatch in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony-cmf/routing/Tests/NestedMatcher/NestedMatcherTest.php \Symfony\Cmf\Component\Routing\Tests\NestedMatcher\NestedMatcherTest::testProviderNoMatch()

File

vendor/symfony-cmf/routing/Tests/NestedMatcher/NestedMatcherTest.php, line 120

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, $this->finalMatcher);
  $this
    ->setExpectedException('Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException');
  $matcher
    ->matchRequest($request);
}