function RouteProviderTest::setUp

Same name in this branch
  1. 10 core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php \Drupal\KernelTests\Core\Entity\RouteProviderTest::setUp()
Same name in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php \Drupal\KernelTests\Core\Routing\RouteProviderTest::setUp()
  2. 9 core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php \Drupal\KernelTests\Core\Entity\RouteProviderTest::setUp()
  3. 8.9.x core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php \Drupal\KernelTests\Core\Routing\RouteProviderTest::setUp()
  4. 8.9.x core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php \Drupal\KernelTests\Core\Entity\RouteProviderTest::setUp()
  5. 11.x core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php \Drupal\KernelTests\Core\Routing\RouteProviderTest::setUp()
  6. 11.x core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php \Drupal\KernelTests\Core\Entity\RouteProviderTest::setUp()

Overrides KernelTestBase::setUp

File

core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php, line 100

Class

RouteProviderTest
Confirm that the default route provider is working correctly.

Namespace

Drupal\KernelTests\Core\Routing

Code

protected function setUp() : void {
    parent::setUp();
    $this->fixtures = new RoutingFixtures();
    $time = \Drupal::service(TimeInterface::class);
    $this->state = new State(new KeyValueMemoryFactory(), new MemoryBackend($time), new NullLockBackend());
    $this->currentPath = new CurrentPathStack(new RequestStack());
    $this->cache = new MemoryBackend($time);
    $this->pathProcessor = \Drupal::service('path_processor_manager');
    $this->cacheTagsInvalidator = \Drupal::service('cache_tags.invalidator');
    $this->installEntitySchema('path_alias');
    $this->logger = new TestLogger();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.