public function MultilingualReviewPageTestBase::prepare in Drupal 10
Same name and namespace in other branches
- 8 core/modules/migrate_drupal_ui/tests/src/Functional/MultilingualReviewPageTestBase.php \Drupal\Tests\migrate_drupal_ui\Functional\MultilingualReviewPageTestBase::prepare()
- 9 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.
2 calls to MultilingualReviewPageTestBase::prepare()
- NoMultilingualReviewPageTest::testMigrateUpgradeReviewPage in core/
modules/ rdf/ tests/ src/ Functional/ Migrate/ NoMultilingualReviewPageTest.php - Tests that RDF is displayed in the will be upgraded list.
- 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\FunctionalCode
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();
}