You are here

function SecureSiteFormGuestTest::testSecureSiteTypeFormGuestUnsetEmptyNoAccess in Secure Site 8

Request home page with empty credentials and access disabled.

File

src/Tests/FormAuth/SecureSiteFormGuestTest.php, line 50
Contains Drupal\securesite\Tests\FormAuth\SecureSiteFormGuestTest

Class

SecureSiteFormGuestTest
Functional tests for form authentication with guest credentials.

Namespace

Drupal\securesite\Tests\FormAuth

Code

function testSecureSiteTypeFormGuestUnsetEmptyNoAccess() {
  $this
    ->drupalPostForm('', array(
    'name' => '',
    'pass' => '',
  ), 'Log in');
  $this
    ->assertNoFieldByXPath('//form[@id="securesite-user-login"]', '', t('Requesting home page with empty credentials and guest access disabled.'));
  $this
    ->assertText('Anonymous users are not allowed to log in to secured pages.', t('Checking for access denied message when guest access is disabled and credentials are empty.'));
}