You are here

public function ControllerResolverTest::providerTestCreateController in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 107
Contains \Drupal\Tests\Core\Controller\ControllerResolverTest.

Class

ControllerResolverTest
@coversDefaultClass \Drupal\Core\Controller\ControllerResolver @group Controller

Namespace

Drupal\Tests\Core\Controller

Code

public function providerTestCreateController() {
  return array(
    // Tests class::method.
    array(
      'Drupal\\Tests\\Core\\Controller\\MockController::getResult',
      'Drupal\\Tests\\Core\\Controller\\MockController',
      'This is a regular controller.',
    ),
    // Tests service:method.
    array(
      'some_service:getResult',
      'Drupal\\Tests\\Core\\Controller\\MockController',
      'This is a regular controller.',
    ),
    // Tests a class with injection.
    array(
      'Drupal\\Tests\\Core\\Controller\\MockContainerInjection::getResult',
      'Drupal\\Tests\\Core\\Controller\\MockContainerInjection',
      'This used injection.',
    ),
    // Tests a ContainerAware class.
    array(
      'Drupal\\Tests\\Core\\Controller\\MockContainerAware::getResult',
      'Drupal\\Tests\\Core\\Controller\\MockContainerAware',
      'This is container aware.',
    ),
  );
}