function ContentLanguageSettingsValidationTest::setUp

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

Overrides ConfigEntityValidationTestBase::setUp

File

core/modules/language/tests/src/Kernel/ContentLanguageSettingsValidationTest.php, line 42

Class

ContentLanguageSettingsValidationTest
Tests validation of content_language_settings entities.

Namespace

Drupal\Tests\language\Kernel

Code

protected function setUp() : void {
    parent::setUp();
    $this->installConfig('node');
    $this->createContentType([
        'type' => 'alpha',
    ]);
    $this->createContentType([
        'type' => 'bravo',
    ]);
    EntityTestBundle::create([
        'id' => 'alpha',
    ])->save();
    EntityTestBundle::create([
        'id' => 'bravo',
    ])->save();
    $this->entity = ContentLanguageSettings::create([
        'target_entity_type_id' => 'node',
        'target_bundle' => 'alpha',
    ]);
    $this->entity
        ->save();
}

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