You are here

protected function MigrateEntityContentBaseTest::setUp in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/migrate/tests/src/Kernel/MigrateEntityContentBaseTest.php \Drupal\Tests\migrate\Kernel\MigrateEntityContentBaseTest::setUp()

Overrides KernelTestBase::setUp

File

core/modules/migrate/tests/src/Kernel/MigrateEntityContentBaseTest.php, line 46

Class

MigrateEntityContentBaseTest
Tests the EntityContentBase destination.

Namespace

Drupal\Tests\migrate\Kernel

Code

protected function setUp() : void {
  parent::setUp();

  // Enable two required fields with default values: a single-value field and
  // a multi-value field.
  \Drupal::state()
    ->set('entity_test.required_default_field', TRUE);
  \Drupal::state()
    ->set('entity_test.required_multi_default_field', TRUE);
  $this
    ->installEntitySchema('entity_test_mul');
  ConfigurableLanguage::createFromLangcode('en')
    ->save();
  ConfigurableLanguage::createFromLangcode('fr')
    ->save();
  $this->storage = $this->container
    ->get('entity_type.manager')
    ->getStorage('entity_test_mul');
}