ReviewPageTest.php

Same filename in this branch
  1. 10 core/modules/tracker/tests/src/Functional/Migrate/ReviewPageTest.php
  2. 10 core/modules/book/tests/src/Functional/Migrate/d7/ReviewPageTest.php
Same filename and directory in other branches
  1. 9 core/modules/tracker/tests/src/Functional/Migrate/ReviewPageTest.php
  2. 11.x core/modules/tracker/tests/src/Functional/Migrate/ReviewPageTest.php
  3. 11.x core/modules/book/tests/src/Functional/Migrate/d6/ReviewPageTest.php
  4. 11.x core/modules/book/tests/src/Functional/Migrate/d7/ReviewPageTest.php

Namespace

Drupal\Tests\book\Functional\Migrate\d6

File

core/modules/book/tests/src/Functional/Migrate/d6/ReviewPageTest.php

View source
<?php

declare (strict_types=1);
namespace Drupal\Tests\book\Functional\Migrate\d6;

use Drupal\Tests\migrate_drupal_ui\Functional\NoMultilingualReviewPageTestBase;

/**
 * Tests Review page.
 *
 * @group book
 * @group legacy
 */
class ReviewPageTest extends NoMultilingualReviewPageTestBase {
  
  /**
   * {@inheritdoc}
   */
  protected static $modules = [
    'book',
  ];
  
  /**
   * {@inheritdoc}
   */
  protected function setUp() : void {
    parent::setUp();
    $this->loadFixture($this->getModulePath('book') . '/tests/fixtures/drupal6.php');
  }
  
  /**
   * Tests the review page.
   */
  public function testMigrateUpgradeReviewPage() : void {
    $this->prepare();
    // Start the upgrade process.
    $this->submitCredentialForm();
    $session = $this->assertSession();
    $this->submitForm([], 'I acknowledge I may lose data. Continue anyway.');
    $session->statusCodeEquals(200);
    // Confirm that Book will be upgraded.
    $session->elementExists('xpath', "//td[contains(@class, 'checked') and text() = 'Book']");
    $session->elementNotExists('xpath', "//td[contains(@class, 'error') and text() = 'Book']");
  }
  
  /**
   * {@inheritdoc}
   */
  protected function getSourceBasePath() {
    return __DIR__;
  }
  
  /**
   * {@inheritdoc}
   */
  protected function getAvailablePaths() {
    return [];
  }
  
  /**
   * {@inheritdoc}
   */
  protected function getIncompletePaths() {
    return [];
  }
  
  /**
   * {@inheritdoc}
   */
  protected function getMissingPaths() {
    return [];
  }

}

Classes

Title Deprecated Summary
ReviewPageTest Tests Review page.

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