function MigrateExternalTranslatedTest::setUp

Same name in other branches
  1. 8.9.x core/modules/migrate/tests/src/Kernel/MigrateExternalTranslatedTest.php \Drupal\Tests\migrate\Kernel\MigrateExternalTranslatedTest::setUp()
  2. 10 core/modules/migrate/tests/src/Kernel/MigrateExternalTranslatedTest.php \Drupal\Tests\migrate\Kernel\MigrateExternalTranslatedTest::setUp()
  3. 11.x 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 34

Class

MigrateExternalTranslatedTest
Tests migrating non-Drupal translated content.

Namespace

Drupal\Tests\migrate\Kernel

Code

public function setUp() : void {
    parent::setUp();
    $this->installSchema('system', [
        'sequences',
    ]);
    $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.