function MigrateTestBase::getMigration

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

Gets the migration plugin.

Parameters

$plugin_id: The plugin ID of the migration to get.

Return value

\Drupal\migrate\Plugin\Migration The migration plugin.

2 calls to MigrateTestBase::getMigration()
MigrateUrlAliasTest::testUrlAlias in core/modules/path/tests/src/Kernel/Migrate/d6/MigrateUrlAliasTest.php
Test the url alias migration.
RollbackViewModesTest::executeRollback in core/modules/field/tests/src/Kernel/Migrate/d7/RollbackViewModesTest.php
Executes a single rollback.

File

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

Class

MigrateTestBase
Creates abstract base class for migration tests.

Namespace

Drupal\Tests\migrate\Kernel

Code

protected function getMigration($plugin_id) {
  return $this->container
    ->get('plugin.manager.migration')
    ->createInstance($plugin_id);
}

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