function SpecialAttributesRouteSubscriberTest::testOnRouteBuildingValidVariables

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

Tests the onAlterRoutes method for valid variables.

@dataProvider providerTestOnRouteBuildingValidVariables

@covers ::onAlterRoutes

Parameters

\Symfony\Component\Routing\Route $route: The route to check.

File

core/tests/Drupal/Tests/Core/EventSubscriber/SpecialAttributesRouteSubscriberTest.php, line 79

Class

SpecialAttributesRouteSubscriberTest
@coversDefaultClass \Drupal\Core\EventSubscriber\SpecialAttributesRouteSubscriber @group EventSubscriber

Namespace

Drupal\Tests\Core\EventSubscriber

Code

public function testOnRouteBuildingValidVariables(Route $route) : void {
    $route_collection = new RouteCollection();
    $route_collection->add('test', $route);
    $event = new RouteBuildEvent($route_collection);
    $subscriber = new SpecialAttributesRouteSubscriber();
    $this->assertNull($subscriber->onAlterRoutes($event));
}

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