function MigrateEntityContentBaseTest::setUp

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

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');
}

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