You are here

protected function MigrateCommentTest::setUp in Zircon Profile 8

Same name in this branch
  1. 8 core/modules/comment/src/Tests/Migrate/d6/MigrateCommentTest.php \Drupal\comment\Tests\Migrate\d6\MigrateCommentTest::setUp()
  2. 8 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.0 core/modules/comment/src/Tests/Migrate/d6/MigrateCommentTest.php \Drupal\comment\Tests\Migrate\d6\MigrateCommentTest::setUp()

Performs setup tasks before each individual test method is run.

Overrides MigrateDrupal6TestBase::setUp

File

core/modules/comment/src/Tests/Migrate/d6/MigrateCommentTest.php, line 30
Contains \Drupal\comment\Tests\Migrate\d6\MigrateCommentTest.

Class

MigrateCommentTest
Upgrade comments.

Namespace

Drupal\comment\Tests\Migrate\d6

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installEntitySchema('node');
  $this
    ->installEntitySchema('comment');
  $this
    ->installSchema('comment', [
    'comment_entity_statistics',
  ]);
  $this
    ->installSchema('system', [
    'router',
  ]);
  $this
    ->installConfig([
    'comment',
  ]);

  // The entity.node.canonical route must exist when the RDF hook is called.
  $this->container
    ->get('router.builder')
    ->rebuild();
  $this
    ->migrateContent();
  $this
    ->executeMigrations([
    'd6_comment_type',
    'd6_comment_field',
    'd6_comment_field_instance',
    'd6_comment_entity_display',
    'd6_comment_entity_form_display',
    'd6_comment',
  ]);
}