You are here

public function SecureSiteNameConflictFunctionalTest::testSecureSiteNameConflictGuest in Secure Site 7.2

Same name and namespace in other branches
  1. 6.2 securesite.test \SecureSiteNameConflictFunctionalTest::testSecureSiteNameConflictGuest()

Set guest name to user name.

File

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

Class

SecureSiteNameConflictFunctionalTest
Functional tests for conflicts between guest name and user names.

Code

public function testSecureSiteNameConflictGuest() {
  $this
    ->drupalLogin($this->user);
  $this
    ->drupalPost('admin/config/securesite', array(
    'securesite_guest_name' => $this->user->name,
  ), 'Save configuration');
  $this
    ->assertText('The name ' . $this->user->name . ' belongs to a registered user.', t('Setting guest name to user name.'));
  $this
    ->assertNotEqual(variable_get('securesite_guest_name', ''), $this->user->name, t('Checking for guest with user name.'));
}