function ControllerResolverTest::testGetController
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php \Drupal\Tests\Core\Controller\ControllerResolverTest::testGetController()
- 10 core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php \Drupal\Tests\Core\Controller\ControllerResolverTest::testGetController()
- 11.x core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php \Drupal\Tests\Core\Controller\ControllerResolverTest::testGetController()
Tests getController().
@dataProvider providerTestGetController
File
-
core/
tests/ Drupal/ Tests/ Core/ Controller/ ControllerResolverTest.php, line 150
Class
- ControllerResolverTest
- @coversDefaultClass \Drupal\Core\Controller\ControllerResolver @group Controller
Namespace
Drupal\Tests\Core\ControllerCode
public function testGetController($attributes, $class, $output = NULL) {
$request = new Request([], [], $attributes);
$result = $this->controllerResolver
->getController($request);
if ($class) {
$this->assertCallableController($result, $class, $output);
}
else {
$this->assertSame(FALSE, $result);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.