function MigrateTestBase::executeMigrations

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

Executes a set of migrations in dependency order.

Parameters

string[] $ids: Array of migration IDs, in any order. If any of these migrations use a deriver, the derivatives will be made before execution.

121 calls to MigrateTestBase::executeMigrations()
EntityContentBaseTest::setUp in core/modules/migrate_drupal/tests/src/Kernel/d6/EntityContentBaseTest.php
FieldDiscoveryTest::setUp in core/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php
FollowUpMigrationsTest::setUp in core/modules/migrate_drupal/tests/src/Kernel/d7/FollowUpMigrationsTest.php
FollowUpMigrationsTest::setUp in core/modules/migrate_drupal/tests/src/Kernel/d6/FollowUpMigrationsTest.php
FollowUpMigrationsTest::testEntityReferenceTranslations in core/modules/migrate_drupal/tests/src/Kernel/d7/FollowUpMigrationsTest.php
Test entity reference translations.

... See full list

File

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

Class

MigrateTestBase
Creates abstract base class for migration tests.

Namespace

Drupal\Tests\migrate\Kernel

Code

protected function executeMigrations(array $ids) {
    $manager = $this->container
        ->get('plugin.manager.migration');
    array_walk($ids, function ($id) use ($manager) {
        // This is possibly a base plugin ID and we want to run all derivatives.
        $instances = $manager->createInstances($id);
        $this->assertNotEmpty($instances, sprintf("No migrations created for id '%s'.", $id));
        array_walk($instances, [
            $this,
            'executeMigration',
        ]);
    });
}

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