function ControllerResolverTest::testGetController

Tests getController().

Attributes

#[DataProvider('providerTestGetController')]

File

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

Class

ControllerResolverTest
Tests Drupal\Core\Controller\ControllerResolver.

Namespace

Drupal\Tests\Core\Controller

Code

public function testGetController($attributes, $class, $output = NULL) : void {
  $request = new Request([], [], $attributes);
  $result = $this->controllerResolver
    ->getController($request);
  if ($class) {
    $this->assertCallableController($result, $class, $output);
  }
  else {
    $this->assertFalse($result);
  }
}

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