function MultilingualReviewPageTestBase::prepare

Same name in other branches
  1. 8.9.x core/modules/migrate_drupal_ui/tests/src/Functional/MultilingualReviewPageTestBase.php \Drupal\Tests\migrate_drupal_ui\Functional\MultilingualReviewPageTestBase::prepare()
  2. 10 core/modules/migrate_drupal_ui/tests/src/Functional/MultilingualReviewPageTestBase.php \Drupal\Tests\migrate_drupal_ui\Functional\MultilingualReviewPageTestBase::prepare()
  3. 11.x core/modules/migrate_drupal_ui/tests/src/Functional/MultilingualReviewPageTestBase.php \Drupal\Tests\migrate_drupal_ui\Functional\MultilingualReviewPageTestBase::prepare()

Performs preparation for the form tests.

This is not done in setup because setup executes before the source database is loaded.

5 calls to MultilingualReviewPageTestBase::prepare()
MultilingualReviewPageTestBase::testMigrateUpgradeReviewPage in core/modules/migrate_drupal_ui/tests/src/Functional/MultilingualReviewPageTestBase.php
Tests the migrate upgrade review form.
NoMultilingualReviewPageTest::testMigrateUpgradeReviewPage in core/modules/rdf/tests/src/Functional/Migrate/NoMultilingualReviewPageTest.php
Tests that RDF is displayed in the will be upgraded list.
NoMultilingualReviewPageTest::testMigrateUpgradeReviewPage in core/modules/color/tests/src/Functional/Migrate/NoMultilingualReviewPageTest.php
Tests that Color is displayed in the will be upgraded list.
NoMultilingualReviewPageTestBase::testMigrateUpgradeReviewPage in core/modules/migrate_drupal_ui/tests/src/Functional/NoMultilingualReviewPageTestBase.php
Tests the review page when content_translation is enabled.
ReviewPageTest::testMigrateUpgradeReviewPage in core/modules/tracker/tests/src/Functional/Migrate/ReviewPageTest.php
Tests the review page.

File

core/modules/migrate_drupal_ui/tests/src/Functional/MultilingualReviewPageTestBase.php, line 81

Class

MultilingualReviewPageTestBase
Provides a base class for testing the review step of the Upgrade form.

Namespace

Drupal\Tests\migrate_drupal_ui\Functional

Code

public function prepare() {
    // Enable all modules in the source except test and example modules, but
    // include simpletest.
    
    /** @var \Drupal\Core\Database\Query\SelectInterface $update */
    $update = $this->sourceDatabase
        ->update('system')
        ->fields([
        'status' => 1,
    ])
        ->condition('type', 'module');
    $and = $update->andConditionGroup()
        ->condition('name', '%test%', 'NOT LIKE')
        ->condition('name', '%example%', 'NOT LIKE');
    $conditions = $update->orConditionGroup();
    $conditions->condition($and);
    $conditions->condition('name', 'simpletest');
    $update->condition($conditions);
    $update->execute();
    // Create entries for D8 test modules.
    $insert = $this->sourceDatabase
        ->insert('system')
        ->fields([
        'filename' => 'migrate_status_active_test',
        'name' => 'migrate_status_active_test',
        'type' => 'module',
        'status' => 1,
    ]);
    $insert->execute();
}

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