You are here

public function ControllerResolverTest::testGetControllerWithObjectAndMethodAsString in Zircon Profile 8

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

File

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

Class

ControllerResolverTest

Namespace

Symfony\Component\HttpKernel\Tests\Controller

Code

public function testGetControllerWithObjectAndMethodAsString() {
  $resolver = $this
    ->createControllerResolver();
  $request = Request::create('/');
  $request->attributes
    ->set('_controller', 'Symfony\\Component\\HttpKernel\\Tests\\Controller\\ControllerResolverTest::controllerMethod1');
  $controller = $resolver
    ->getController($request);
  $this
    ->assertInstanceOf('Symfony\\Component\\HttpKernel\\Tests\\Controller\\ControllerResolverTest', $controller[0], '->getController() returns a PHP callable');
}