function MigrateExternalTranslatedTest::setUp

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

Overrides MigrateTestBase::setUp

File

core/modules/migrate/tests/src/Kernel/MigrateExternalTranslatedTest.php, line 36

Class

MigrateExternalTranslatedTest
Tests migrating non-Drupal translated content.

Namespace

Drupal\Tests\migrate\Kernel

Code

protected function setUp() : void {
    parent::setUp();
    $this->installSchema('node', [
        'node_access',
    ]);
    $this->installEntitySchema('user');
    $this->installEntitySchema('node');
    // Create some languages.
    ConfigurableLanguage::createFromLangcode('en')->save();
    ConfigurableLanguage::createFromLangcode('fr')->save();
    ConfigurableLanguage::createFromLangcode('es')->save();
    // Create a content type.
    NodeType::create([
        'type' => 'external_test',
        'name' => 'Test node type',
    ])->save();
}

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