public function DynamicRouterTest::testMatchRequestWithUrlMatcher in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony-cmf/routing/Tests/Routing/DynamicRouterTest.php \Symfony\Cmf\Component\Routing\Tests\Routing\DynamicRouterTest::testMatchRequestWithUrlMatcher()
File
- vendor/
symfony-cmf/ routing/ Tests/ Routing/ DynamicRouterTest.php, line 160
Class
Namespace
Symfony\Cmf\Component\Routing\Tests\RoutingCode
public function testMatchRequestWithUrlMatcher() {
$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
->isInstanceOf('Symfony\\Component\\HttpFoundation\\Request'))
->will($this
->returnValue($expected));
$results = $this->router
->matchRequest($this->request);
$this
->assertEquals($expected, $results);
}