You are here

protected function MigrateNodeTestBase::setUp in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTestBase.php \Drupal\Tests\node\Kernel\Migrate\d6\MigrateNodeTestBase::setUp()

Overrides MigrateDrupal6TestBase::setUp

7 calls to MigrateNodeTestBase::setUp()
FollowUpMigrationsTest::setUp in core/modules/migrate_drupal/tests/src/Kernel/d6/FollowUpMigrationsTest.php
MigrateForumTest::setUp in core/modules/forum/tests/src/Kernel/Migrate/d6/MigrateForumTest.php
MigrateImageTest::setUp in core/modules/image/tests/src/Kernel/Migrate/d6/MigrateImageTest.php
MigrateMenuLinkTest::setUp in core/modules/menu_link_content/tests/src/Kernel/Migrate/d6/MigrateMenuLinkTest.php
MigrateNodeCompleteTest::setUp in core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeCompleteTest.php

... See full list

7 methods override MigrateNodeTestBase::setUp()
FollowUpMigrationsTest::setUp in core/modules/migrate_drupal/tests/src/Kernel/d6/FollowUpMigrationsTest.php
MigrateForumTest::setUp in core/modules/forum/tests/src/Kernel/Migrate/d6/MigrateForumTest.php
MigrateImageTest::setUp in core/modules/image/tests/src/Kernel/Migrate/d6/MigrateImageTest.php
MigrateMenuLinkTest::setUp in core/modules/menu_link_content/tests/src/Kernel/Migrate/d6/MigrateMenuLinkTest.php
MigrateNodeCompleteTest::setUp in core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeCompleteTest.php

... See full list

File

core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTestBase.php, line 16

Class

MigrateNodeTestBase
Base class for Node migration tests.

Namespace

Drupal\Tests\node\Kernel\Migrate\d6

Code

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

  // Create a new user which needs to have UID 1, because that is expected by
  // the assertions from
  // \Drupal\migrate_drupal\Tests\d6\MigrateNodeRevisionTest.
  User::create([
    'uid' => 1,
    'name' => $this
      ->randomMachineName(),
    'status' => 1,
  ])
    ->enforceIsNew()
    ->save();
  $this
    ->migrateUsers(FALSE);
  $this
    ->migrateFields();
  $this
    ->executeMigration('d6_node_settings');
}