function SpecialAttributesRouteSubscriberTest::providerTestOnRouteBuildingInvalidVariables
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/EventSubscriber/SpecialAttributesRouteSubscriberTest.php \Drupal\Tests\Core\EventSubscriber\SpecialAttributesRouteSubscriberTest::providerTestOnRouteBuildingInvalidVariables()
- 10 core/tests/Drupal/Tests/Core/EventSubscriber/SpecialAttributesRouteSubscriberTest.php \Drupal\Tests\Core\EventSubscriber\SpecialAttributesRouteSubscriberTest::providerTestOnRouteBuildingInvalidVariables()
- 11.x core/tests/Drupal/Tests/Core/EventSubscriber/SpecialAttributesRouteSubscriberTest.php \Drupal\Tests\Core\EventSubscriber\SpecialAttributesRouteSubscriberTest::providerTestOnRouteBuildingInvalidVariables()
Provides a list of routes with invalid route variables.
Return value
array An array of invalid routes.
File
-
core/
tests/ Drupal/ Tests/ Core/ EventSubscriber/ SpecialAttributesRouteSubscriberTest.php, line 25
Class
- SpecialAttributesRouteSubscriberTest
- @coversDefaultClass \Drupal\Core\EventSubscriber\SpecialAttributesRouteSubscriber @group EventSubscriber
Namespace
Drupal\Tests\Core\EventSubscriberCode
public function providerTestOnRouteBuildingInvalidVariables() {
// Build an array of mock route objects based on paths.
$routes = [];
$paths = [
'/test/{system_path}',
'/test/{_legacy}',
'/test/{' . RouteObjectInterface::ROUTE_OBJECT . '}',
'/test/{' . RouteObjectInterface::ROUTE_NAME . '}',
'/test/{_content}',
'/test/{_form}',
'/test/{_raw_variables}',
];
foreach ($paths as $path) {
$routes[] = [
new Route($path),
];
}
return $routes;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.