function HtRouterTest::testHtRouter

Same name and namespace in other branches
  1. 9 core/tests/Drupal/BuildTests/Framework/Tests/HtRouterTest.php \Drupal\BuildTests\Framework\Tests\HtRouterTest::testHtRouter()
  2. 8.9.x core/tests/Drupal/BuildTests/Framework/Tests/HtRouterTest.php \Drupal\BuildTests\Framework\Tests\HtRouterTest::testHtRouter()
  3. 10 core/tests/Drupal/BuildTests/Framework/Tests/HtRouterTest.php \Drupal\BuildTests\Framework\Tests\HtRouterTest::testHtRouter()

@covers ::instantiateServer

File

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

Class

HtRouterTest
@coversDefaultClass <a href="/api/drupal/core%21tests%21Drupal%21BuildTests%21Framework%21BuildTestBase.php/class/BuildTestBase/11.x" title="Provides a workspace to test build processes." class="local">\Drupal\BuildTests\Framework\BuildTestBase</a> @group Build @requires extension pdo_sqlite

Namespace

Drupal\BuildTests\Framework\Tests

Code

public function testHtRouter() : void {
    $sqlite = (new \PDO('sqlite::memory:'))->query('select sqlite_version()')
        ->fetch()[0];
    if (version_compare($sqlite, 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);
}

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