public function SpecialAttributesRouteSubscriberTest::providerTestOnRouteBuildingInvalidVariables 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::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 28 - Contains \Drupal\Tests\Core\EventSubscriber\SpecialAttributesRouteSubscriberTest.
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;
}