You are here

protected function ParagraphsMigrationTestBase::executeMigrationWithDependencies in Paragraphs 8

Execute a migration's dependencies followed by the migration.

Parameters

string $plugin_id: The migration id to execute.

4 calls to ParagraphsMigrationTestBase::executeMigrationWithDependencies()
ParagraphContentMigrationTest::setUp in tests/src/Kernel/migrate/ParagraphContentMigrationTest.php
ParagraphsFieldMigrationTest::testParagrahsFieldInstanceMigration in tests/src/Kernel/migrate/ParagraphsFieldMigrationTest.php
Test if the paragraph field instances were migrated.
ParagraphsFieldMigrationTest::testParagraphFormatters in tests/src/Kernel/migrate/ParagraphsFieldMigrationTest.php
Test Paragraph Formatter Migration.
ParagraphsFieldMigrationTest::testParagraphsWidgets in tests/src/Kernel/migrate/ParagraphsFieldMigrationTest.php
Test Paragraph widget Migration.

File

tests/src/Kernel/migrate/ParagraphsMigrationTestBase.php, line 93

Class

ParagraphsMigrationTestBase
Base class for the paragraph migrations tests.

Namespace

Drupal\Tests\paragraphs\Kernel\migrate

Code

protected function executeMigrationWithDependencies($plugin_id) {

  /** @var \Drupal\migrate\Plugin\MigrationPluginManagerInterface $manager */
  $manager = $this->container
    ->get('plugin.manager.migration');
  $migrations = $manager
    ->createInstances($plugin_id);
  foreach ($migrations as $migration) {
    $this
      ->executeMigrationDependencies($migration);
    $this
      ->executeMigration($migration);
  }
}