public function ControllerResolverTest::testCreateControllerInvalidName in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php \Drupal\Tests\Core\Controller\ControllerResolverTest::testCreateControllerInvalidName()
- 9 core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php \Drupal\Tests\Core\Controller\ControllerResolverTest::testCreateControllerInvalidName()
Tests createController() with an invalid name.
File
- core/
tests/ Drupal/ Tests/ Core/ Controller/ ControllerResolverTest.php, line 102 - Contains \Drupal\Tests\Core\Controller\ControllerResolverTest.
Class
- ControllerResolverTest
- @coversDefaultClass \Drupal\Core\Controller\ControllerResolver @group Controller
Namespace
Drupal\Tests\Core\ControllerCode
public function testCreateControllerInvalidName() {
$this
->expectException(\LogicException::class);
$this->controllerResolver
->getControllerFromDefinition('ClassWithoutMethod');
}