public function ControllerResolverTest::providerTestCreateController in Drupal 8
Same name and namespace in other branches
- 9 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 116 - Contains \Drupal\Tests\Core\Controller\ControllerResolverTest.
Class
- ControllerResolverTest
- @coversDefaultClass \Drupal\Core\Controller\ControllerResolver @group Controller
Namespace
Drupal\Tests\Core\ControllerCode
public 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.',
],
];
}