You are here

public function MigrateExternalTranslatedTest::setUp in Drupal 8

Same name and namespace in other branches
  1. 9 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() {
  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();
}