You are here

protected function RoutePreloaderTest::setUp in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Routing/RoutePreloaderTest.php \Drupal\Tests\Core\Routing\RoutePreloaderTest::setUp()
  2. 9 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 \Drupal\Core\Routing\RoutePreloader @group Routing

Namespace

Drupal\Tests\Core\Routing

Code

protected function setUp() : void {
  $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);
}