function SecureSiteNameConflictFunctionalTest::setUp in Secure Site 6.2
Same name and namespace in other branches
- 7.2 securesite.test \SecureSiteNameConflictFunctionalTest::setUp()
Implementation of setUp().
Overrides DrupalWebTestCase::setUp
File
- ./
securesite.test, line 824 - Tests for Secure Site module.
Class
- SecureSiteNameConflictFunctionalTest
- Functional tests for conflicts between guest name and user names.
Code
function setUp() {
parent::setUp('securesite');
$perm = db_result(db_query_range("SELECT perm FROM {permission} WHERE rid = %d", DRUPAL_ANONYMOUS_RID, 0, 1));
db_query("UPDATE {permission} SET perm = '%s' WHERE rid = %d", $perm . ', access secured pages', DRUPAL_ANONYMOUS_RID);
$this->guest = $this
->randomName();
variable_set('securesite_guest_name', $this->guest);
$this->user = $this
->drupalCreateUser(array(
'administer site configuration',
'administer users',
'change own username',
));
}