You are here

public function ControllerResolverTest::testGetControllerWithClassAndMethod 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::testGetControllerWithClassAndMethod()

File

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

Class

ControllerResolverTest

Namespace

Symfony\Component\HttpKernel\Tests\Controller

Code

public function testGetControllerWithClassAndMethod() {
  $resolver = $this
    ->createControllerResolver();
  $request = Request::create('/');
  $request->attributes
    ->set('_controller', array(
    'Symfony\\Component\\HttpKernel\\Tests\\Controller\\ControllerResolverTest',
    'controllerMethod4',
  ));
  $controller = $resolver
    ->getController($request);
  $this
    ->assertSame(array(
    'Symfony\\Component\\HttpKernel\\Tests\\Controller\\ControllerResolverTest',
    'controllerMethod4',
  ), $controller);
}