function RoutePreloaderTest::setUp

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Routing/RoutePreloaderTest.php \Drupal\Tests\Core\Routing\RoutePreloaderTest::setUp()
  2. 10 core/tests/Drupal/Tests/Core/Routing/RoutePreloaderTest.php \Drupal\Tests\Core\Routing\RoutePreloaderTest::setUp()
  3. 11.x core/tests/Drupal/Tests/Core/Routing/RoutePreloaderTest.php \Drupal\Tests\Core\Routing\RoutePreloaderTest::setUp()

Overrides UnitTestCase::setUp

File

core/tests/Drupal/Tests/Core/Routing/RoutePreloaderTest.php, line 49

Class

RoutePreloaderTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Routing%21RoutePreloader.php/class/RoutePreloader/8.9.x" title="Defines a class which preloads non-admin routes." class="local">\Drupal\Core\Routing\RoutePreloader</a> @group Routing

Namespace

Drupal\Tests\Core\Routing

Code

protected function setUp() {
    $this->routeProvider = $this->createMock('Drupal\\Core\\Routing\\PreloadableRouteProviderInterface');
    $this->state = $this->createMock('\\Drupal\\Core\\State\\StateInterface');
    $this->cache = $this->createMock('Drupal\\Core\\Cache\\CacheBackendInterface');
    $this->preloader = new RoutePreloader($this->routeProvider, $this->state, $this->cache);
}

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