function MigrateTestBase::executeMigration

Same name in other branches
  1. 8.9.x core/modules/migrate/tests/src/Kernel/MigrateTestBase.php \Drupal\Tests\migrate\Kernel\MigrateTestBase::executeMigration()
  2. 10 core/modules/migrate/tests/src/Kernel/MigrateTestBase.php \Drupal\Tests\migrate\Kernel\MigrateTestBase::executeMigration()
  3. 11.x core/modules/migrate/tests/src/Kernel/MigrateTestBase.php \Drupal\Tests\migrate\Kernel\MigrateTestBase::executeMigration()

Executes a single migration.

Parameters

string|\Drupal\migrate\Plugin\MigrationInterface $migration: The migration to execute, or its ID.

147 calls to MigrateTestBase::executeMigration()
EntityContentBaseTest::testOverwriteAllMappedProperties in core/modules/migrate_drupal/tests/src/Kernel/d6/EntityContentBaseTest.php
Tests overwriting all mapped properties in the destination entity.
EntityContentBaseTest::testOverwriteProperties in core/modules/migrate_drupal/tests/src/Kernel/d6/EntityContentBaseTest.php
Tests overwriting selected properties in the destination entity.
EntityRevisionTest::testRevisionTranslation in core/modules/migrate/tests/src/Kernel/Plugin/EntityRevisionTest.php
Tests that EntityRevision correctly handles revision translations.
FieldDiscoveryTest::setUp in core/modules/migrate_drupal/tests/src/Kernel/d6/FieldDiscoveryTest.php
HighWaterTest::setUp in core/modules/migrate/tests/src/Kernel/HighWaterTest.php

... See full list

File

core/modules/migrate/tests/src/Kernel/MigrateTestBase.php, line 166

Class

MigrateTestBase
Creates abstract base class for migration tests.

Namespace

Drupal\Tests\migrate\Kernel

Code

protected function executeMigration($migration) {
    if (is_string($migration)) {
        $this->migration = $this->getMigration($migration);
    }
    else {
        $this->migration = $migration;
    }
    if ($this instanceof MigrateDumpAlterInterface) {
        static::migrateDumpAlter($this);
    }
    $this->prepareMigration($this->migration);
    (new MigrateExecutable($this->migration, $this))
        ->import();
}

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