function LanguageTestBase::setUp

Same name in this branch
  1. 10 core/modules/language/tests/src/Kernel/LanguageTestBase.php \Drupal\Tests\language\Kernel\LanguageTestBase::setUp()
Same name in other branches
  1. 9 core/modules/language/tests/src/Kernel/Views/LanguageTestBase.php \Drupal\Tests\language\Kernel\Views\LanguageTestBase::setUp()
  2. 9 core/modules/language/tests/src/Kernel/LanguageTestBase.php \Drupal\Tests\language\Kernel\LanguageTestBase::setUp()
  3. 8.9.x core/modules/language/tests/src/Kernel/Views/LanguageTestBase.php \Drupal\Tests\language\Kernel\Views\LanguageTestBase::setUp()
  4. 8.9.x core/modules/language/tests/src/Kernel/LanguageTestBase.php \Drupal\Tests\language\Kernel\LanguageTestBase::setUp()
  5. 11.x core/modules/language/tests/src/Kernel/Views/LanguageTestBase.php \Drupal\Tests\language\Kernel\Views\LanguageTestBase::setUp()
  6. 11.x core/modules/language/tests/src/Kernel/LanguageTestBase.php \Drupal\Tests\language\Kernel\LanguageTestBase::setUp()

Overrides ViewsKernelTestBase::setUp

File

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

Class

LanguageTestBase
Defines the base class for all Language handler tests.

Namespace

Drupal\Tests\language\Kernel\Views

Code

protected function setUp($import_test_views = TRUE) : void {
    parent::setUp();
    $this->installConfig([
        'language',
    ]);
    // Create another language beside English.
    ConfigurableLanguage::create([
        'id' => 'xx-lolspeak',
        'label' => 'Lolspeak',
    ])->save();
}

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