You are here

public function SecureLoginTest::testHttpsSecureLogin in Secure Login 8

Ensure HTTPS requests do not get redirected.

File

tests/src/Functional/SecureLoginTest.php, line 35

Class

SecureLoginTest
Basic tests for Secure login module.

Namespace

Drupal\Tests\securelogin\Functional

Code

public function testHttpsSecureLogin() {
  $this
    ->drupalGet($this
    ->httpsUrl('user/login'));
  $this
    ->assertSession()
    ->statusCodeEquals(200);
  $xpath = $this
    ->xpath('//form[@id="user-login-form"]');
  $this
    ->assertSame(1, count($xpath), 'The user is on the login form.');
}