function MigrateTestBase::executeMigrations

Same name and namespace in other branches
  1. 8.9.x 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.

75 calls to MigrateTestBase::executeMigrations()
MigrateAggregatorItemTest::setUp in core/modules/aggregator/tests/src/Kernel/Migrate/d6/MigrateAggregatorItemTest.php
MigrateBlockContentBodyFieldTest::setUp in core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentBodyFieldTest.php
MigrateBlockContentEntityDisplayTest::setUp in core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentEntityDisplayTest.php
MigrateBlockContentEntityFormDisplayTest::setUp in core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentEntityFormDisplayTest.php
MigrateBlockContentTest::setUp in core/modules/block_content/tests/src/Kernel/Migrate/d6/MigrateBlockContentTest.php

... See full list

File

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

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.