function MigrationPluginManagerTest::testCreateInstancesByTag
Same name in other branches
- 9 core/modules/migrate/tests/src/Kernel/MigrationPluginManagerTest.php \Drupal\Tests\migrate\Kernel\MigrationPluginManagerTest::testCreateInstancesByTag()
- 11.x core/modules/migrate/tests/src/Kernel/MigrationPluginManagerTest.php \Drupal\Tests\migrate\Kernel\MigrationPluginManagerTest::testCreateInstancesByTag()
Tests Migration::createInstancesByTag().
@covers ::createInstancesByTag
@dataProvider providerCreateInstanceByTag
File
-
core/
modules/ migrate/ tests/ src/ Kernel/ MigrationPluginManagerTest.php, line 43
Class
- MigrationPluginManagerTest
- Tests the migration plugin manager.
Namespace
Drupal\Tests\migrate\KernelCode
public function testCreateInstancesByTag($tags, $expected) : void {
// The test module includes a migration that does not use the migration_tags
// property. It is there to confirm that it is not included in the results.
// We create it to ensure it is a valid migration.
$migration = $this->migrationPluginManager
->createInstances([
'tag_test_no_tag',
]);
$this->assertArrayHasKey('tag_test_no_tag', $migration);
$migrations = $this->migrationPluginManager
->createInstancesByTag($tags);
$actual = array_keys($migrations);
$this->assertSame($expected, $actual);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.