function ControllerResolverTest::providerTestCreateController

Provides test data for testCreateController().

File

core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php, line 68

Class

ControllerResolverTest
Tests Drupal\Core\Controller\ControllerResolver.

Namespace

Drupal\Tests\Core\Controller

Code

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.',
    ],
  ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.