function ControllerResolverTest::testGetControllerFromDefinition

Tests getControllerFromDefinition().

Attributes

#[DataProvider('providerTestGetControllerFromDefinition')]

File

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

Class

ControllerResolverTest
Tests Drupal\Core\Controller\ControllerResolver.

Namespace

Drupal\Tests\Core\Controller

Code

public function testGetControllerFromDefinition($definition, $output) : void {
  $this->container
    ->set('invoke_service', new MockInvokeController());
  $controller = $this->controllerResolver
    ->getControllerFromDefinition($definition);
  $this->assertCallableController($controller, NULL, $output);
}

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