You are here

protected function MetatagEntitiesTest::setUp in Metatag 8

Overrides MigrateDrupal7TestBase::setUp

File

tests/src/Kernel/Migrate/d7/MetatagEntitiesTest.php, line 80

Class

MetatagEntitiesTest
Tests migration of per-entity data from Metatag-D7.

Namespace

Drupal\Tests\metatag\Kernel\Migrate\d7

Code

protected function setUp() {
  if (version_compare(\Drupal::VERSION, '8.9', '<')) {
    $this
      ->markTestSkipped('This test requires at least Drupal 8.9');
  }
  parent::setUp();
  $this
    ->loadFixture(__DIR__ . '/../../../../fixtures/d7_metatag.php');
  $this
    ->installEntitySchema('node');
  $this
    ->installEntitySchema('comment');
  $this
    ->installEntitySchema('taxonomy_term');
  $this
    ->installEntitySchema('menu_link_content');
  $this
    ->installConfig(static::$modules);
  $this
    ->installSchema('node', [
    'node_access',
  ]);
  $this
    ->installSchema('system', [
    'sequences',
  ]);
  $this
    ->installEntitySchema('metatag_defaults');
  $this
    ->executeMigrations([
    'language',
    'd7_metatag_field',
    'd7_node_type',
    'd7_taxonomy_vocabulary',
    'd7_metatag_field_instance',
    'd7_metatag_field_instance_widget_settings',
    'd7_user_role',
    'd7_user',
    'd7_comment_type',
    'd7_field',
    'd7_field_instance',
    'd7_language_content_settings',
  ]);
  $this
    ->fileMigrationSetup();
  $this
    ->executeMigrations([
    'd7_node_complete',
    'd7_taxonomy_term',
  ]);
}