You are here

private function RenameAdminPathEventSubscriberTest::assertRoutePaths in Rename Admin Paths 8.2

Parameters

array $config:

array $routes:

4 calls to RenameAdminPathEventSubscriberTest::assertRoutePaths()
RenameAdminPathEventSubscriberTest::testDoNotRenamePaths in tests/src/Unit/EventSubscriber/RenameAdminPathEventSubscriberTest.php
RenameAdminPathEventSubscriberTest::testRenameAdminPath in tests/src/Unit/EventSubscriber/RenameAdminPathEventSubscriberTest.php
RenameAdminPathEventSubscriberTest::testRenameAdminPaths in tests/src/Unit/EventSubscriber/RenameAdminPathEventSubscriberTest.php
RenameAdminPathEventSubscriberTest::testRenameUserPath in tests/src/Unit/EventSubscriber/RenameAdminPathEventSubscriberTest.php

File

tests/src/Unit/EventSubscriber/RenameAdminPathEventSubscriberTest.php, line 142

Class

RenameAdminPathEventSubscriberTest
@group tests

Namespace

Drupal\Tests\rename_admin_paths\Unit\EventSubscriber

Code

private function assertRoutePaths(array $config, array $routes) {
  $routeCollection = $this
    ->getRouteCollection();
  $config = new Config($this
    ->getConfigFactoryStub([
    'rename_admin_paths.settings' => $config,
  ]));
  $eventSubscriber = new RenameAdminPathsEventSubscriber($config);
  $eventSubscriber
    ->onRoutesAlter(new RouteBuildEvent($routeCollection));
  foreach ($routes as $name => $path) {
    $this
      ->assertEquals($path, $routeCollection
      ->get($name)
      ->getPath());
  }
}