You are here

protected function TokenReplaceUnitTestBase::setUp in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/System/TokenReplaceUnitTestBase.php \Drupal\system\Tests\System\TokenReplaceUnitTestBase::setUp()

Performs setup tasks before each individual test method is run.

Overrides EntityUnitTestBase::setUp

2 calls to TokenReplaceUnitTestBase::setUp()
NodeTokenReplaceTest::setUp in core/modules/node/src/Tests/NodeTokenReplaceTest.php
Performs setup tasks before each individual test method is run.
TokenReplaceUnitTest::setUp in core/modules/system/src/Tests/System/TokenReplaceUnitTest.php
@inheritdoc
2 methods override TokenReplaceUnitTestBase::setUp()
NodeTokenReplaceTest::setUp in core/modules/node/src/Tests/NodeTokenReplaceTest.php
Performs setup tasks before each individual test method is run.
TokenReplaceUnitTest::setUp in core/modules/system/src/Tests/System/TokenReplaceUnitTest.php
@inheritdoc

File

core/modules/system/src/Tests/System/TokenReplaceUnitTestBase.php, line 38
Contains \Drupal\system\Tests\System\TokenReplaceUnitTestBase.

Class

TokenReplaceUnitTestBase
Base class for token replacement tests.

Namespace

Drupal\system\Tests\System

Code

protected function setUp() {
  parent::setUp();

  // Install default system configuration.
  $this
    ->installConfig(array(
    'system',
  ));
  $this
    ->installSchema('system', array(
    'router',
  ));
  \Drupal::service('router.builder')
    ->rebuild();
  $this->interfaceLanguage = \Drupal::languageManager()
    ->getCurrentLanguage();
  $this->tokenService = \Drupal::token();
}