You are here

protected function LanguageTestBase::setUp in Drupal 10

Same name in this branch
  1. 10 core/modules/language/tests/src/Kernel/LanguageTestBase.php \Drupal\Tests\language\Kernel\LanguageTestBase::setUp()
  2. 10 core/modules/language/tests/src/Kernel/Views/LanguageTestBase.php \Drupal\Tests\language\Kernel\Views\LanguageTestBase::setUp()
Same name and namespace in other branches
  1. 8 core/modules/language/tests/src/Kernel/LanguageTestBase.php \Drupal\Tests\language\Kernel\LanguageTestBase::setUp()
  2. 9 core/modules/language/tests/src/Kernel/LanguageTestBase.php \Drupal\Tests\language\Kernel\LanguageTestBase::setUp()

File

core/modules/language/tests/src/Kernel/LanguageTestBase.php, line 30

Class

LanguageTestBase
Test for dependency injected language object.

Namespace

Drupal\Tests\language\Kernel

Code

protected function setUp() : void {
  parent::setUp();
  $this
    ->installConfig([
    'language',
  ]);
  $this->state = $this->container
    ->get('state');

  // Ensure we are building a new Language object for each test.
  $this->languageManager = $this->container
    ->get('language_manager');
  $this->languageManager
    ->reset();
}