function MigrateDrupal7AuditIdsTest::setUp

Same name in this branch
  1. 9 core/modules/aggregator/tests/src/Kernel/Migrate/d7/MigrateDrupal7AuditIdsTest.php \Drupal\Tests\aggregator\Kernel\Migrate\d7\MigrateDrupal7AuditIdsTest::setUp()
Same name in other branches
  1. 8.9.x core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7AuditIdsTest.php \Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7AuditIdsTest::setUp()
  2. 10 core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7AuditIdsTest.php \Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7AuditIdsTest::setUp()
  3. 11.x core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7AuditIdsTest.php \Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7AuditIdsTest::setUp()

Overrides MigrateDrupal7TestBase::setUp

File

core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7AuditIdsTest.php, line 27

Class

MigrateDrupal7AuditIdsTest
Tests the migration auditor for ID conflicts.

Namespace

Drupal\Tests\migrate_drupal\Kernel\d7

Code

protected function setUp() : void {
    // Enable all modules.
    self::$modules = array_keys($this->coreModuleListDataProvider());
    parent::setUp();
    // Install required entity schemas.
    $this->installEntitySchemas();
    // Install required schemas.
    $this->installSchema('book', [
        'book',
    ]);
    $this->installSchema('dblog', [
        'watchdog',
    ]);
    $this->installSchema('forum', [
        'forum_index',
    ]);
    $this->installSchema('node', [
        'node_access',
    ]);
    $this->installSchema('search', [
        'search_dataset',
    ]);
    $this->installSchema('system', [
        'sequences',
    ]);
    // @todo Remove tracker in https://www.drupal.org/project/drupal/issues/3261452
    $this->installSchema('tracker', [
        'tracker_node',
        'tracker_user',
    ]);
    // Enable content moderation for nodes of type page.
    $this->installEntitySchema('content_moderation_state');
    $this->installConfig('content_moderation');
    NodeType::create([
        'type' => 'page',
    ])->save();
    $workflow = $this->createEditorialWorkflow();
    $workflow->getTypePlugin()
        ->addEntityTypeAndBundle('node', 'page');
    $workflow->save();
}

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