You are here

class HtRouterTest in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/BuildTests/Framework/Tests/HtRouterTest.php \Drupal\BuildTests\Framework\Tests\HtRouterTest
  2. 9 core/tests/Drupal/BuildTests/Framework/Tests/HtRouterTest.php \Drupal\BuildTests\Framework\Tests\HtRouterTest

@coversDefaultClass \Drupal\BuildTests\Framework\BuildTestBase @group Build @requires extension pdo_sqlite

Hierarchy

  • class \Drupal\BuildTests\QuickStart\QuickStartTestBase extends \Drupal\BuildTests\Framework\BuildTestBase

Expanded class hierarchy of HtRouterTest

File

core/tests/Drupal/BuildTests/Framework/Tests/HtRouterTest.php, line 13

Namespace

Drupal\BuildTests\Framework\Tests
View source
class HtRouterTest extends QuickStartTestBase {

  /**
   * @covers ::instantiateServer
   */
  public function testHtRouter() {
    if (version_compare(\SQLite3::version()['versionString'], Tasks::SQLITE_MINIMUM_VERSION) < 0) {
      $this
        ->markTestSkipped();
    }
    $this
      ->copyCodebase();
    $this
      ->executeCommand('COMPOSER_DISCARD_CHANGES=true composer install --no-dev --no-interaction');
    $this
      ->assertErrorOutputContains('Generating autoload files');
    $this
      ->installQuickStart('minimal');
    $this
      ->formLogin($this->adminUsername, $this->adminPassword);
    $this
      ->visit('/.well-known/change-password');
    $this
      ->assertDrupalVisit();
    $url = $this
      ->getMink()
      ->getSession()
      ->getCurrentUrl();
    $this
      ->assertEquals('http://localhost:' . $this
      ->getPortNumber() . '/user/1/edit', $url);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
HtRouterTest::testHtRouter public function @covers ::instantiateServer
QuickStartTestBase::$adminPassword protected property Password of the admin account generated during install.
QuickStartTestBase::$adminUsername protected property User name of the admin account generated during install.
QuickStartTestBase::formLogin public function Helper that uses Drupal's user/login form to log in.
QuickStartTestBase::installQuickStart public function Install a Drupal site using the quick start feature.