function Upgrade7Test::setUp

Same name in this branch
  1. 11.x core/modules/forum/tests/src/Functional/migrate_drupal/d7/Upgrade7Test.php \Drupal\Tests\forum\Functional\migrate_drupal\d7\Upgrade7Test::setUp()
Same name and namespace in other branches
  1. 9 core/modules/rdf/tests/src/Functional/Migrate/Upgrade7Test.php \Drupal\Tests\rdf\Functional\Migrate\Upgrade7Test::setUp()
  2. 9 core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php \Drupal\Tests\migrate_drupal_ui\Functional\d7\Upgrade7Test::setUp()
  3. 8.9.x core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php \Drupal\Tests\migrate_drupal_ui\Functional\d7\Upgrade7Test::setUp()
  4. 10 core/modules/forum/tests/src/Functional/migrate_drupal/d7/Upgrade7Test.php \Drupal\Tests\forum\Functional\migrate_drupal\d7\Upgrade7Test::setUp()
  5. 10 core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php \Drupal\Tests\migrate_drupal_ui\Functional\d7\Upgrade7Test::setUp()

Overrides MigrateUpgradeExecuteTestBase::setUp

1 call to Upgrade7Test::setUp()
Upgrade7TestWithContentModeration::setUp in core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7TestWithContentModeration.php
1 method overrides Upgrade7Test::setUp()
Upgrade7TestWithContentModeration::setUp in core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7TestWithContentModeration.php

File

core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php, line 45

Class

Upgrade7Test
Tests Drupal 7 upgrade using the migrate UI.

Namespace

Drupal\Tests\migrate_drupal_ui\Functional\d7

Code

protected function setUp() : void {
    parent::setUp();
    // @todo remove in https://www.drupal.org/project/drupal/issues/3267040
    // Delete the existing content made to test the ID Conflict form. Migrations
    // are to be done on a site without content. The test of the ID Conflict
    // form is being moved to its own issue which will remove the deletion
    // of the created nodes.
    // See https://www.drupal.org/project/drupal/issues/3087061.
    $this->nodeStorage = $this->container
        ->get('entity_type.manager')
        ->getStorage('node');
    $this->nodeStorage
        ->delete($this->nodeStorage
        ->loadMultiple());
    $this->loadFixture($this->getModulePath('migrate_drupal') . '/tests/fixtures/drupal7.php');
    $this->expectedLoggedErrors = 27;
    // If saving the logs, then set the admin user.
    if ($this->outputLogs) {
        $this->migratedAdminUserName = 'admin';
    }
}

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