function SessionHttpsTest::getUserLoginFormBuildId

Same name and namespace in other branches
  1. 8.9.x core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php \Drupal\Tests\system\Functional\Session\SessionHttpsTest::getUserLoginFormBuildId()
  2. 10 core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php \Drupal\Tests\system\Functional\Session\SessionHttpsTest::getUserLoginFormBuildId()
  3. 11.x core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php \Drupal\Tests\system\Functional\Session\SessionHttpsTest::getUserLoginFormBuildId()

Gets the form build ID for the user login form.

Return value

string The form build ID for the user login form.

2 calls to SessionHttpsTest::getUserLoginFormBuildId()
SessionHttpsTest::loginHttp in core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php
Log in a user via HTTP.
SessionHttpsTest::loginHttps in core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php
Log in a user via HTTPS.

File

core/modules/system/tests/src/Functional/Session/SessionHttpsTest.php, line 315

Class

SessionHttpsTest
Ensure that when running under HTTPS two session cookies are generated.

Namespace

Drupal\Tests\system\Functional\Session

Code

protected function getUserLoginFormBuildId() {
    $this->drupalGet('user/login');
    return (string) $this->getSession()
        ->getPage()
        ->findField('form_build_id');
}

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