public function SpecialAttributesRouteSubscriberTest::providerTestOnRouteBuildingValidVariables in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/EventSubscriber/SpecialAttributesRouteSubscriberTest.php \Drupal\Tests\Core\EventSubscriber\SpecialAttributesRouteSubscriberTest::providerTestOnRouteBuildingValidVariables()
- 9 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 50
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;
}