public function SpecialAttributesRouteSubscriberTest::providerTestOnRouteBuildingValidVariables in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/EventSubscriber/SpecialAttributesRouteSubscriberTest.php \Drupal\Tests\Core\EventSubscriber\SpecialAttributesRouteSubscriberTest::providerTestOnRouteBuildingValidVariables()
Provides a list of routes with valid route variables.
Return value
array An array of valid routes.
File
- core/
tests/ Drupal/ Tests/ Core/ EventSubscriber/ SpecialAttributesRouteSubscriberTest.php, line 54 - Contains \Drupal\Tests\Core\EventSubscriber\SpecialAttributesRouteSubscriberTest.
Class
- SpecialAttributesRouteSubscriberTest
- @coversDefaultClass \Drupal\Core\EventSubscriber\SpecialAttributesRouteSubscriber @group EventSubscriber
Namespace
Drupal\Tests\Core\EventSubscriberCode
public function providerTestOnRouteBuildingValidVariables() {
// Build an array of mock route objects based on paths.
$routes = [];
$paths = [
'/test/{account}',
'/test/{node}',
'/test/{user}',
'/test/{entity_test}',
];
foreach ($paths as $path) {
$routes[] = [
new Route($path),
];
}
return $routes;
}