public function RouterListenerTest::testRequestMatcher in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-kernel/Tests/EventListener/RouterListenerTest.php \Symfony\Component\HttpKernel\Tests\EventListener\RouterListenerTest::testRequestMatcher()
File
- vendor/
symfony/ http-kernel/ Tests/ EventListener/ RouterListenerTest.php, line 86
Class
Namespace
Symfony\Component\HttpKernel\Tests\EventListenerCode
public function testRequestMatcher() {
$kernel = $this
->getMock('Symfony\\Component\\HttpKernel\\HttpKernelInterface');
$request = Request::create('http://localhost/');
$event = new GetResponseEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST);
$requestMatcher = $this
->getMock('Symfony\\Component\\Routing\\Matcher\\RequestMatcherInterface');
$requestMatcher
->expects($this
->once())
->method('matchRequest')
->with($this
->isInstanceOf('Symfony\\Component\\HttpFoundation\\Request'))
->will($this
->returnValue(array()));
$listener = new RouterListener($requestMatcher, new RequestContext(), null, $this->requestStack);
$listener
->onKernelRequest($event);
}