function CreateMigrationsTrait::drupal6Migrations

Same name in other branches
  1. 9 core/modules/migrate_drupal/tests/src/Traits/CreateMigrationsTrait.php \Drupal\Tests\migrate_drupal\Traits\CreateMigrationsTrait::drupal6Migrations()
  2. 8.9.x core/modules/migrate_drupal/tests/src/Traits/CreateMigrationsTrait.php \Drupal\Tests\migrate_drupal\Traits\CreateMigrationsTrait::drupal6Migrations()
  3. 11.x core/modules/migrate_drupal/tests/src/Traits/CreateMigrationsTrait.php \Drupal\Tests\migrate_drupal\Traits\CreateMigrationsTrait::drupal6Migrations()

Create instances of all Drupal 6 migrations.

Return value

\Drupal\migrate\Plugin\MigrationInterface[] The migrations

1 call to CreateMigrationsTrait::drupal6Migrations()
DestinationCategoryTest::testD6Categories in core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/DestinationCategoryTest.php
Tests that all D6 migrations are tagged as either Configuration or Content.

File

core/modules/migrate_drupal/tests/src/Traits/CreateMigrationsTrait.php, line 15

Class

CreateMigrationsTrait

Namespace

Drupal\Tests\migrate_drupal\Traits

Code

public function drupal6Migrations() {
    $dirs = \Drupal::service('module_handler')->getModuleDirectories();
    $migrate_drupal_directory = $dirs['migrate_drupal'];
    $this->loadFixture("{$migrate_drupal_directory}/tests/fixtures/drupal6.php");
    return \Drupal::service('plugin.manager.migration')->createInstancesByTag('Drupal 6');
}

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