public function RouterListenerTest::testLoggingParameter 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::testLoggingParameter()
@dataProvider getLoggingParameterData
File
- vendor/
symfony/ http-kernel/ Tests/ EventListener/ RouterListenerTest.php, line 135
Class
Namespace
Symfony\Component\HttpKernel\Tests\EventListenerCode
public function testLoggingParameter($parameter, $log) {
$requestMatcher = $this
->getMock('Symfony\\Component\\Routing\\Matcher\\RequestMatcherInterface');
$requestMatcher
->expects($this
->once())
->method('matchRequest')
->will($this
->returnValue($parameter));
$logger = $this
->getMock('Psr\\Log\\LoggerInterface');
$logger
->expects($this
->once())
->method('info')
->with($this
->equalTo($log));
$kernel = $this
->getMock('Symfony\\Component\\HttpKernel\\HttpKernelInterface');
$request = Request::create('http://localhost/');
$listener = new RouterListener($requestMatcher, new RequestContext(), $logger, $this->requestStack);
$listener
->onKernelRequest(new GetResponseEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST));
}