function ContactAttachContactFormsTestCase::drupalLogoutWithUserGlobalRolesUpdate in Contact Attach 7
Logs out a user with the internal browser and updates the $user global.
drupalLogout() does not update the $user global after logging out. This function populates $user->roles with the anonymous role.
4 calls to ContactAttachContactFormsTestCase::drupalLogoutWithUserGlobalRolesUpdate()
- ContactAttachContactFormsTestCase::checkExistenceOfAttachmentFields in ./
contact_attach.test - Checks existence of attachment fields on site-wide and user contact forms.
- ContactAttachContactFormsTestCase::checkNumberOfAttachmentFields in ./
contact_attach.test - Checks the number of attachment fields after setting the variable.
- ContactAttachContactFormsTestCase::submitAttachmentWhenNoSettingsSet in ./
contact_attach.test - Submits contact forms with attachments when no settings are set.
- ContactAttachContactFormsTestCase::submitWithAttachments in ./
contact_attach.test - Submits contact forms with attachments after setting the settings.
File
- ./
contact_attach.test, line 628 - Tests for the Contact Attach module.
Class
- ContactAttachContactFormsTestCase
- Tests the Contact Attach functionality for site-wide and user contact forms.
Code
function drupalLogoutWithUserGlobalRolesUpdate() {
global $user;
$this
->drupalLogout();
$user->roles = array(
DRUPAL_ANONYMOUS_RID => 'anonymous user',
);
}