function MigrateUpgradeTestBase::assertReviewForm
Helper to assert content on the Review form.
Parameters
array|null $available_paths: An array of modules that will be upgraded. Defaults to $this->getAvailablePaths().
array|null $missing_paths: An array of modules that will not be upgraded. Defaults to $this->getMissingPaths().
Throws
\Behat\Mink\Exception\ExpectationException
6 calls to MigrateUpgradeTestBase::assertReviewForm()
- MigrateUpgradeExecuteTestBase::doUpgradeAndIncremental in core/modules/ migrate_drupal_ui/ tests/ src/ Functional/ MigrateUpgradeExecuteTestBase.php 
- Executes an upgrade and then an incremental upgrade.
- MultilingualReviewPageTestBase::testMigrateUpgradeReviewPage in core/modules/ migrate_drupal_ui/ tests/ src/ Functional/ MultilingualReviewPageTestBase.php 
- Tests the migrate upgrade review form.
- NoMultilingualReviewPageTestBase::testMigrateUpgradeReviewPage in core/modules/ migrate_drupal_ui/ tests/ src/ Functional/ NoMultilingualReviewPageTestBase.php 
- Tests the review page when content_translation is enabled.
- Upgrade7Test::testUpgrade in core/modules/ rdf/ tests/ src/ Functional/ Migrate/ Upgrade7Test.php 
- Executes all steps of migrations upgrade.
- UpgradeTest::testUpgrade in core/modules/ aggregator/ tests/ src/ Functional/ migrate_drupal_ui/ d6/ UpgradeTest.php 
- Executes an upgrade.
File
- 
              core/modules/ migrate_drupal_ui/ tests/ src/ Functional/ MigrateUpgradeTestBase.php, line 206 
Class
- MigrateUpgradeTestBase
- Provides a base class for testing migration upgrades in the UI.
Namespace
Drupal\Tests\migrate_drupal_ui\FunctionalCode
protected function assertReviewForm(array $available_paths = NULL, array $missing_paths = NULL) {
  $session = $this->assertSession();
  $session->pageTextContains('What will be upgraded?');
  $available_paths = $available_paths ?? $this->getAvailablePaths();
  $missing_paths = $missing_paths ?? $this->getMissingPaths();
  // Test the available migration paths.
  foreach ($available_paths as $available) {
    $session->elementExists('xpath', "//td[contains(@class, 'checked') and text() = '{$available}']");
    $session->elementNotExists('xpath', "//td[contains(@class, 'error') and text() = '{$available}']");
  }
  // Test the missing migration paths.
  foreach ($missing_paths as $missing) {
    $session->elementExists('xpath', "//td[contains(@class, 'error') and text() = '{$missing}']");
    $session->elementNotExists('xpath', "//td[contains(@class, 'checked') and text() = '{$missing}']");
  }
  // Test the total count of missing and available paths.
  $session->elementsCount('xpath', "//td[contains(@class, 'upgrade-analysis-report__status-icon--error')]", count($missing_paths));
  $session->elementsCount('xpath', "//td[contains(@class, 'upgrade-analysis-report__status-icon--checked')]", count($available_paths));
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
