You are here

protected function LanguageAccessBrowserTest::setUp in Language access 8

Overrides KernelTestBase::setUp

File

tests/src/Kernel/LanguageAccessBrowserTest.php, line 40

Class

LanguageAccessBrowserTest
Test language access browser test.

Namespace

Drupal\Tests\language_access\Kernel

Code

protected function setUp() : void {
  parent::setUp();
  $this
    ->installConfig([
    'user',
  ]);
  $this
    ->installSchema('system', [
    'sequences',
  ]);
  $this
    ->installEntitySchema('user');

  // Create a user. This user will have ID 1. This will prevent the tests from
  // creating a user with ID 1 which will always have all permissions.
  $this
    ->createUser();
  $this->languageNegotiator = $this->container
    ->get('language_negotiator');

  // Create languages.
  ConfigurableLanguage::createFromLangcode('nl')
    ->save();
  ConfigurableLanguage::createFromLangcode('fr')
    ->save();
}