public function ControllerResolverTest::testGetControllerFromDefinitionNotCallable in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php \Drupal\Tests\Core\Controller\ControllerResolverTest::testGetControllerFromDefinitionNotCallable()
Tests getControllerFromDefinition() without a callable.
File
- core/
tests/ Drupal/ Tests/ Core/ Controller/ ControllerResolverTest.php, line 170 - Contains \Drupal\Tests\Core\Controller\ControllerResolverTest.
Class
- ControllerResolverTest
- @coversDefaultClass \Drupal\Core\Controller\ControllerResolver @group Controller
Namespace
Drupal\Tests\Core\ControllerCode
public function testGetControllerFromDefinitionNotCallable() {
$this
->expectException(\InvalidArgumentException::class);
$this->controllerResolver
->getControllerFromDefinition('Drupal\\Tests\\Core\\Controller\\MockController::bananas');
}