public function MigrationTestBase::test in Lightning Workflow 8.3
Same name and namespace in other branches
- 8.2 modules/lightning_scheduler/tests/src/Functional/MigrationTestBase.php \Drupal\Tests\lightning_scheduler\Functional\MigrationTestBase::test()
Runs a basic test of migrating old Lightning Scheduler data.
This doesn't really test that data integrity is preserved, so subclasses should override this method and call it before asserting other things.
3 calls to MigrationTestBase::test()
- BaseFieldMigrationTest::test in modules/
lightning_scheduler/ tests/ src/ Functional/ BaseFieldMigrationTest.php - Runs a basic test of migrating old Lightning Scheduler data.
- MigrationStatusPageTest::test in modules/
lightning_scheduler/ tests/ src/ Functional/ MigrationStatusPageTest.php - Runs a basic test of migrating old Lightning Scheduler data.
- PurgeTest::test in modules/
lightning_scheduler/ tests/ src/ Functional/ PurgeTest.php - Runs a basic test of migrating old Lightning Scheduler data.
3 methods override MigrationTestBase::test()
- BaseFieldMigrationTest::test in modules/
lightning_scheduler/ tests/ src/ Functional/ BaseFieldMigrationTest.php - Runs a basic test of migrating old Lightning Scheduler data.
- MigrationStatusPageTest::test in modules/
lightning_scheduler/ tests/ src/ Functional/ MigrationStatusPageTest.php - Runs a basic test of migrating old Lightning Scheduler data.
- PurgeTest::test in modules/
lightning_scheduler/ tests/ src/ Functional/ PurgeTest.php - Runs a basic test of migrating old Lightning Scheduler data.
File
- modules/
lightning_scheduler/ tests/ src/ Functional/ MigrationTestBase.php, line 37
Class
- MigrationTestBase
- Base class for testing migration of old Lightning Scheduler data.
Namespace
Drupal\Tests\lightning_scheduler\FunctionalCode
public function test() {
$this
->runUpdates();
$migrations = $this->container
->get('state')
->get('lightning_scheduler.migrations');
$this
->assertCount(2, $migrations);
$this
->assertContains('block_content', $migrations);
$this
->assertContains('node', $migrations);
$assert = $this
->assertSession();
$url = $assert
->elementExists('named', [
'link',
'migrate your existing content',
])
->getAttribute('href');
$this
->drupalLogin($this->rootUser);
$this
->drupalGet($url);
$assert
->statusCodeEquals(200);
$assert
->pageTextContains('Migrate scheduled transitions');
$assert
->elementExists('named', [
'link',
'switch to maintenance mode',
]);
}