function ControllerResolverTest::testCreateControllerNonExistentClass

Tests createController() with a non-existent class.

File

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

Class

ControllerResolverTest
Tests Drupal\Core\Controller\ControllerResolver.

Namespace

Drupal\Tests\Core\Controller

Code

public function testCreateControllerNonExistentClass() : void {
  $this->expectException(\InvalidArgumentException::class);
  $this->controllerResolver
    ->getControllerFromDefinition('Class::method');
}

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