You are here

public function DynamicRouterTest::testMatchUrl in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony-cmf/routing/Tests/Routing/DynamicRouterTest.php \Symfony\Cmf\Component\Routing\Tests\Routing\DynamicRouterTest::testMatchUrl()

File

vendor/symfony-cmf/routing/Tests/Routing/DynamicRouterTest.php, line 139

Class

DynamicRouterTest

Namespace

Symfony\Cmf\Component\Routing\Tests\Routing

Code

public function testMatchUrl() {
  $routeDefaults = array(
    'foo' => 'bar',
  );
  $this->matcher
    ->expects($this
    ->once())
    ->method('match')
    ->with($this->url)
    ->will($this
    ->returnValue($routeDefaults));
  $expected = array(
    'this' => 'that',
  );
  $this->enhancer
    ->expects($this
    ->once())
    ->method('enhance')
    ->with($this
    ->equalTo($routeDefaults), $this
    ->equalTo($this->request))
    ->will($this
    ->returnValue($expected));
  $results = $this->router
    ->match($this->url);
  $this
    ->assertEquals($expected, $results);
}