function CreateMigrationsTrait::drupal7Migrations
Same name in other branches
- 9 core/modules/migrate_drupal/tests/src/Traits/CreateMigrationsTrait.php \Drupal\Tests\migrate_drupal\Traits\CreateMigrationsTrait::drupal7Migrations()
- 8.9.x core/modules/migrate_drupal/tests/src/Traits/CreateMigrationsTrait.php \Drupal\Tests\migrate_drupal\Traits\CreateMigrationsTrait::drupal7Migrations()
- 11.x core/modules/migrate_drupal/tests/src/Traits/CreateMigrationsTrait.php \Drupal\Tests\migrate_drupal\Traits\CreateMigrationsTrait::drupal7Migrations()
Create instances of all Drupal 7 migrations.
Return value
\Drupal\migrate\Plugin\MigrationInterface[] The migrations
1 call to CreateMigrationsTrait::drupal7Migrations()
- DestinationCategoryTest::testD7Categories in core/
modules/ migrate_drupal/ tests/ src/ Kernel/ Plugin/ migrate/ DestinationCategoryTest.php - Tests that all D7 migrations are tagged as either Configuration or Content.
File
-
core/
modules/ migrate_drupal/ tests/ src/ Traits/ CreateMigrationsTrait.php, line 28
Class
Namespace
Drupal\Tests\migrate_drupal\TraitsCode
public function drupal7Migrations() {
$dirs = \Drupal::service('module_handler')->getModuleDirectories();
$migrate_drupal_directory = $dirs['migrate_drupal'];
$this->loadFixture("{$migrate_drupal_directory}/tests/fixtures/drupal7.php");
return \Drupal::service('plugin.manager.migration')->createInstancesByTag('Drupal 7');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.