You are here

protected function LanguageTestBase::setUp in Drupal 9

Same name in this branch
  1. 9 core/modules/language/tests/src/Kernel/LanguageTestBase.php \Drupal\Tests\language\Kernel\LanguageTestBase::setUp()
  2. 9 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/Views/LanguageTestBase.php \Drupal\Tests\language\Kernel\Views\LanguageTestBase::setUp()

Parameters

bool $import_test_views: Should the views specified on the test class be imported. If you need to setup some additional stuff, like fields, you need to call false and then call createTestViews for your own.

Overrides ViewsKernelTestBase::setUp

File

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

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) {
  parent::setUp();
  $this
    ->installConfig([
    'language',
  ]);

  // Create another language beside English.
  ConfigurableLanguage::create([
    'id' => 'xx-lolspeak',
    'label' => 'Lolspeak',
  ])
    ->save();
}