function ContentTranslationHandlerTest::setUp

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

Overrides KernelTestBase::setUp

File

core/modules/content_translation/tests/src/Kernel/ContentTranslationHandlerTest.php, line 75

Class

ContentTranslationHandlerTest
Tests the content translation handler.

Namespace

Drupal\Tests\content_translation\Kernel

Code

protected function setUp() : void {
    parent::setUp();
    $this->state = $this->container
        ->get('state');
    $this->entityTypeBundleInfo = $this->container
        ->get('entity_type.bundle.info');
    $this->entityTypeManager = $this->container
        ->get('entity_type.manager');
    $this->messenger = $this->container
        ->get('messenger');
    $this->installEntitySchema($this->entityTypeId);
    ConfigurableLanguage::createFromLangcode($this->translationLangcode)
        ->save();
}

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