You are here

protected function MigrateDrupal7TestBase::migrateContent in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7TestBase.php \Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase::migrateContent()
  2. 9 core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7TestBase.php \Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase::migrateContent()

Executes all content migrations.

Parameters

bool $include_revisions: (optional) If TRUE, migrates node revisions. Defaults to FALSE.

1 call to MigrateDrupal7TestBase::migrateContent()
MigrateCommentTest::setUp in core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTest.php

File

core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7TestBase.php, line 88

Class

MigrateDrupal7TestBase
Base class for Drupal 7 migration tests.

Namespace

Drupal\Tests\migrate_drupal\Kernel\d7

Code

protected function migrateContent($include_revisions = FALSE) {
  $this
    ->migrateContentTypes();
  $this
    ->migrateCommentTypes();
  $this
    ->migrateUsers(FALSE);

  // Uses executeMigrations() rather than executeMigration() because the
  // former includes all of the migration derivatives, e.g.
  // d7_node:article.
  $this
    ->executeMigrations([
    'd7_node',
  ]);
  if ($include_revisions) {
    $this
      ->executeMigrations([
      'd7_node_revision',
    ]);
  }
}