function ControllerResolverTest::providerTestGetController

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php \Drupal\Tests\Core\Controller\ControllerResolverTest::providerTestGetController()
  2. 8.9.x core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php \Drupal\Tests\Core\Controller\ControllerResolverTest::providerTestGetController()
  3. 11.x core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php \Drupal\Tests\Core\Controller\ControllerResolverTest::providerTestGetController()

Provides test data for testGetController().

File

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

Class

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

Namespace

Drupal\Tests\Core\Controller

Code

public static function providerTestGetController() {
    return [
        // Tests passing a controller via the request.
[
            [
                '_controller' => 'Drupal\\Tests\\Core\\Controller\\MockContainerAware::getResult',
            ],
            'Drupal\\Tests\\Core\\Controller\\MockContainerAware',
            'This is container aware.',
        ],
        // Tests a request with no controller specified.
[
            [],
            FALSE,
        ],
    ];
}

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