function AttributeRouteDiscoveryTest::testInvalidClasses

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Routing/AttributeRouteDiscoveryTest.php \Drupal\Tests\Core\Routing\AttributeRouteDiscoveryTest::testInvalidClasses()

Tests that invalid controller classes do not break route discovery.

File

core/tests/Drupal/Tests/Core/Routing/AttributeRouteDiscoveryTest.php, line 111

Class

AttributeRouteDiscoveryTest
Tests \Drupal\Core\Routing\AttributeRouteDiscovery.

Namespace

Drupal\Tests\Core\Routing

Code

public function testInvalidClasses() : void {
  $this->assertNotNull($this->routeCollection
    ->get('router_test.method_attribute'));
  $this->assertNotNull($this->routeCollection
    ->get('router_test.class_invoke'));
  $this->assertNull($this->routeCollection
    ->get('router_test.missing_dependency'));
}

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