You are here

function SecureSiteTypeFormGuestFunctionalTest::testSecureSiteTypeFormGuestUnsetEmptyNoAccess in Secure Site 6.2

Same name and namespace in other branches
  1. 7.2 securesite.test \SecureSiteTypeFormGuestFunctionalTest::testSecureSiteTypeFormGuestUnsetEmptyNoAccess()

Request home page with empty credentials and access disabled.

File

./securesite.test, line 1578
Tests for Secure Site module.

Class

SecureSiteTypeFormGuestFunctionalTest
Functional tests for form authentication with guest credentials.

Code

function testSecureSiteTypeFormGuestUnsetEmptyNoAccess() {
  $this
    ->drupalPost('', 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.'));
}