public function SpecialAttributesRouteSubscriberTest::testOnRouteBuildingValidVariables in Drupal 9
Same name and namespace in other branches
- 8 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 77
Class
- SpecialAttributesRouteSubscriberTest
- @coversDefaultClass \Drupal\Core\EventSubscriber\SpecialAttributesRouteSubscriber @group EventSubscriber
Namespace
Drupal\Tests\Core\EventSubscriberCode
public function testOnRouteBuildingValidVariables(Route $route) {
$route_collection = new RouteCollection();
$route_collection
->add('test', $route);
$event = new RouteBuildEvent($route_collection, 'test');
$subscriber = new SpecialAttributesRouteSubscriber();
$this
->assertNull($subscriber
->onAlterRoutes($event));
}