You are here

public function SpecialAttributesRouteSubscriberTest::providerTestOnRouteBuildingValidVariables in Zircon Profile 8

Same name and namespace in other branches
  1. 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\EventSubscriber

Code

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;
}