public function ControllerResolverTest::testCreateController in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php \Drupal\Tests\Core\Controller\ControllerResolverTest::testCreateController()
Tests createController().
@dataProvider providerTestCreateController
File
- core/
tests/ Drupal/ Tests/ Core/ Controller/ ControllerResolverTest.php, line 72 - Contains \Drupal\Tests\Core\Controller\ControllerResolverTest.
Class
- ControllerResolverTest
- @coversDefaultClass \Drupal\Core\Controller\ControllerResolver @group Controller
Namespace
Drupal\Tests\Core\ControllerCode
public function testCreateController($controller, $class, $output) {
$this->container
->set('some_service', new MockController());
$result = $this->controllerResolver
->getControllerFromDefinition($controller);
$this
->assertCallableController($result, $class, $output);
}