function ControllerResolverTest::providerTestCreateController
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php \Drupal\Tests\Core\Controller\ControllerResolverTest::providerTestCreateController()
- 8.9.x core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php \Drupal\Tests\Core\Controller\ControllerResolverTest::providerTestCreateController()
- 11.x core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php \Drupal\Tests\Core\Controller\ControllerResolverTest::providerTestCreateController()
Provides test data for testCreateController().
File
-
core/
tests/ Drupal/ Tests/ Core/ Controller/ ControllerResolverTest.php, line 69
Class
- ControllerResolverTest
- @coversDefaultClass \Drupal\Core\Controller\ControllerResolver @group Controller
Namespace
Drupal\Tests\Core\ControllerCode
public static function providerTestCreateController() {
return [
// Tests class::method.
[
'Drupal\\Tests\\Core\\Controller\\MockController::getResult',
'Drupal\\Tests\\Core\\Controller\\MockController',
'This is a regular controller.',
],
// Tests service:method.
[
'some_service:getResult',
'Drupal\\Tests\\Core\\Controller\\MockController',
'This is a regular controller.',
],
// Tests a class with injection.
[
'Drupal\\Tests\\Core\\Controller\\MockContainerInjection::getResult',
'Drupal\\Tests\\Core\\Controller\\MockContainerInjection',
'This used injection.',
],
// Tests a ContainerAware class.
[
'Drupal\\Tests\\Core\\Controller\\MockContainerAware::getResult',
'Drupal\\Tests\\Core\\Controller\\MockContainerAware',
'This is container aware.',
'Implementing \\Symfony\\Component\\DependencyInjection\\ContainerAwareInterface is deprecated in drupal:10.3.0 and it will be removed in drupal:11.0.0. Implement \\Drupal\\Core\\DependencyInjection\\ContainerInjectionInterface and use dependency injection instead. See https://www.drupal.org/node/3428661',
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.