function MigrateDrupal6AuditIdsTest::setUp

Same name in other branches
  1. 9 core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6AuditIdsTest.php \Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6AuditIdsTest::setUp()
  2. 9 core/modules/aggregator/tests/src/Kernel/Migrate/d6/MigrateDrupal6AuditIdsTest.php \Drupal\Tests\aggregator\Kernel\Migrate\d6\MigrateDrupal6AuditIdsTest::setUp()
  3. 8.9.x core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6AuditIdsTest.php \Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6AuditIdsTest::setUp()
  4. 10 core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6AuditIdsTest.php \Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6AuditIdsTest::setUp()

Overrides MigrateDrupal6TestBase::setUp

File

core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6AuditIdsTest.php, line 31

Class

MigrateDrupal6AuditIdsTest
Tests the migration auditor for ID conflicts.

Namespace

Drupal\Tests\migrate_drupal\Kernel\d6

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('dblog', [
        'watchdog',
    ]);
    $this->installSchema('node', [
        'node_access',
    ]);
    $this->installSchema('search', [
        'search_dataset',
    ]);
    // Enable content moderation for nodes of type page.
    $this->installEntitySchema('content_moderation_state');
    $this->installConfig('content_moderation');
    NodeType::create([
        'type' => 'page',
        'name' => '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.