function LanguageSelectWidgetTest::setUp

Same name in other branches
  1. 9 core/modules/language/tests/src/Kernel/LanguageSelectWidgetTest.php \Drupal\Tests\language\Kernel\LanguageSelectWidgetTest::setUp()
  2. 8.9.x core/modules/language/tests/src/Kernel/LanguageSelectWidgetTest.php \Drupal\Tests\language\Kernel\LanguageSelectWidgetTest::setUp()
  3. 11.x core/modules/language/tests/src/Kernel/LanguageSelectWidgetTest.php \Drupal\Tests\language\Kernel\LanguageSelectWidgetTest::setUp()

Overrides KernelTestBase::setUp

File

core/modules/language/tests/src/Kernel/LanguageSelectWidgetTest.php, line 37

Class

LanguageSelectWidgetTest
Tests the language select widget.

Namespace

Drupal\Tests\language\Kernel

Code

protected function setUp() : void {
    parent::setUp();
    $this->installEntitySchema('entity_test');
    $this->installEntitySchema('user');
    $storage = $this->container
        ->get('entity_type.manager')
        ->getStorage('entity_form_display');
    $this->entityFormDisplay = $storage->create([
        'targetEntityType' => 'entity_test',
        'bundle' => 'entity_test',
        'mode' => 'default',
        'status' => TRUE,
    ]);
}

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