function MigrateDrupal7TestBase::migrateContent

Same name in other branches
  1. 8.9.x core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7TestBase.php \Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase::migrateContent()
  2. 10 core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7TestBase.php \Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase::migrateContent()
  3. 11.x 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',
        ]);
    }
}

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