You are here

public function ControllerResolverTest::testGetControllerWithoutControllerParameter in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-kernel/Tests/Controller/ControllerResolverTest.php \Symfony\Component\HttpKernel\Tests\Controller\ControllerResolverTest::testGetControllerWithoutControllerParameter()

File

vendor/symfony/http-kernel/Tests/Controller/ControllerResolverTest.php, line 20

Class

ControllerResolverTest

Namespace

Symfony\Component\HttpKernel\Tests\Controller

Code

public function testGetControllerWithoutControllerParameter() {
  $logger = $this
    ->getMock('Psr\\Log\\LoggerInterface');
  $logger
    ->expects($this
    ->once())
    ->method('warning')
    ->with('Unable to look for the controller as the "_controller" parameter is missing.');
  $resolver = $this
    ->createControllerResolver($logger);
  $request = Request::create('/');
  $this
    ->assertFalse($resolver
    ->getController($request), '->getController() returns false when the request has no _controller attribute');
}