class MigrateNodeTestBase

Same name and namespace in other branches
  1. 11.x core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTestBase.php \Drupal\Tests\node\Kernel\Migrate\d6\MigrateNodeTestBase

Base class for Node migration tests.

Hierarchy

Expanded class hierarchy of MigrateNodeTestBase

5 files declare their use of MigrateNodeTestBase
FollowUpMigrationsTest.php in core/modules/migrate_drupal/tests/src/Kernel/d6/FollowUpMigrationsTest.php
MigrateForumTest.php in core/modules/forum/tests/src/Kernel/Migrate/d6/MigrateForumTest.php
MigrateImageTest.php in core/modules/image/tests/src/Kernel/Migrate/d6/MigrateImageTest.php
MigrateMenuLinkLocalizedTest.php in core/modules/menu_link_content/tests/src/Kernel/Migrate/d6/MigrateMenuLinkLocalizedTest.php
MigrateMenuLinkTest.php in core/modules/menu_link_content/tests/src/Kernel/Migrate/d6/MigrateMenuLinkTest.php

File

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

Namespace

Drupal\Tests\node\Kernel\Migrate\d6
View source
abstract class MigrateNodeTestBase extends MigrateDrupal6TestBase {
  
  /**
   * {@inheritdoc}
   */
  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');
  }

}

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