protected function ParagraphsMigrationTestBase::prepareMigration

File

paragraphs/tests/src/Kernel/migrate/ParagraphsMigrationTestBase.php, line 131

Class

ParagraphsMigrationTestBase
Base class for the paragraph migrations tests.

Namespace

Drupal\Tests\paragraphs\Kernel\migrate

Code

protected function prepareMigration(MigrationInterface $migration) {

  // We want to run the revision migration without running all the node
  // migrations.
  if ($migration
    ->id() == 'd7_node_revision:paragraphs_test') {
    $migration
      ->set('migration_dependencies', [
      'required' => [
        'd7_node:paragraphs_test',
      ],
      'optional' => [],
    ]);
    $migration
      ->set('requirements', [
      'd7_node:paragraphs_test' => 'd7_node:paragraphs_test',
    ]);
  }
}