You are here

public function MockRouteProvider::getRoutesByNames in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/src/Tests/Routing/MockRouteProvider.php \Drupal\system\Tests\Routing\MockRouteProvider::getRoutesByNames()
  2. 9 core/modules/system/src/Tests/Routing/MockRouteProvider.php \Drupal\system\Tests\Routing\MockRouteProvider::getRoutesByNames()

File

core/modules/system/src/Tests/Routing/MockRouteProvider.php, line 64

Class

MockRouteProvider
Easily configurable mock route provider.

Namespace

Drupal\system\Tests\Routing

Code

public function getRoutesByNames($names) {
  $routes = [];
  foreach ($names as $name) {
    $routes[] = $this->routes
      ->get($name);
  }
  return $routes;
}