You are here

protected function MigrateCommentTest::setUp in Zircon Profile 8.0

Same name in this branch
  1. 8.0 core/modules/comment/src/Tests/Migrate/d6/MigrateCommentTest.php \Drupal\comment\Tests\Migrate\d6\MigrateCommentTest::setUp()
  2. 8.0 core/modules/comment/src/Tests/Migrate/d7/MigrateCommentTest.php \Drupal\comment\Tests\Migrate\d7\MigrateCommentTest::setUp()
Same name and namespace in other branches
  1. 8 core/modules/comment/src/Tests/Migrate/d7/MigrateCommentTest.php \Drupal\comment\Tests\Migrate\d7\MigrateCommentTest::setUp()

Performs setup tasks before each individual test method is run.

Overrides MigrateDrupal7TestBase::setUp

File

core/modules/comment/src/Tests/Migrate/d7/MigrateCommentTest.php, line 27
Contains \Drupal\comment\Tests\Migrate\d7\MigrateCommentTest.

Class

MigrateCommentTest
Tests migration of comments from Drupal 7.

Namespace

Drupal\comment\Tests\Migrate\d7

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installConfig(static::$modules);
  $this
    ->installEntitySchema('node');
  $this
    ->installEntitySchema('comment');
  $this
    ->executeMigrations([
    'd7_filter_format',
    'd7_user_role',
    'd7_user',
  ]);
  $this
    ->executeMigration('d7_node_type');

  // We only need the test_content_type node migration to run for real, so
  // mock all the others.
  $this
    ->prepareMigrations(array(
    'd7_node:*' => array(
      array(
        array(
          0,
        ),
        array(
          0,
        ),
      ),
    ),
  ));
  $this
    ->executeMigrations([
    'd7_node__test_content_type',
    'd7_comment_type',
    'd7_comment',
  ]);
}