public function MigrationStatusPageTest::test in Lightning Workflow 8.2
Same name and namespace in other branches
- 8.3 modules/lightning_scheduler/tests/src/Functional/MigrationStatusPageTest.php \Drupal\Tests\lightning_scheduler\Functional\MigrationStatusPageTest::test()
Overrides MigrationTestBase::test
File
- modules/
lightning_scheduler/ tests/ src/ Functional/ MigrationStatusPageTest.php, line 12
Class
- MigrationStatusPageTest
- @group lightning @group lightning_workflow @group lightning_scheduler
Namespace
Drupal\Tests\lightning_scheduler\FunctionalCode
public function test() {
parent::test();
$assert = $this
->assertSession();
$text = 'Some content has not yet been migrated into the new base fields installed by Lightning Scheduler.';
// parent::test() navigates to the migration UI, so we'll want to be sure
// that the status page is linking to that.
$url = parse_url($this
->getSession()
->getCurrentUrl(), PHP_URL_PATH);
$this
->assertNotEmpty($url);
$this
->drupalGet('/admin/reports/status');
$assert
->pageTextContains($text);
$assert
->linkByHrefExists($url);
$this->container
->get('lightning_scheduler.migrator')
->setMigrations([]);
$this
->getSession()
->reload();
$assert
->pageTextNotContains($text);
}