function ContactAttachContactFormsTestCase::resetPersistentVariablesAndPermissions in Contact Attach 7
Resets all of the module's persistent variables and users' permissions.
1 call to ContactAttachContactFormsTestCase::resetPersistentVariablesAndPermissions()
- ContactAttachContactFormsTestCase::testContactAttachContactForms in ./
contact_attach.test - Tests the attachment functionality on the site-wide and user contact forms.
File
- ./
contact_attach.test, line 638 - Tests for the Contact Attach module.
Class
- ContactAttachContactFormsTestCase
- Tests the Contact Attach functionality for site-wide and user contact forms.
Code
function resetPersistentVariablesAndPermissions() {
// Reset all persistent variables for the next run.
variable_del('contact_attach_simple_field');
variable_del('contact_attach_extensions_site');
variable_del('contact_attach_extensions_user');
variable_del('contact_attach_number_site');
variable_del('contact_attach_number_user');
variable_del('contact_attach_uploadsize_site');
variable_del('contact_attach_uploadsize_user');
// Revoke all module permissions for the next run.
user_role_revoke_permissions(DRUPAL_ANONYMOUS_RID, array_values($this->contact_forms));
user_role_revoke_permissions(DRUPAL_AUTHENTICATED_RID, array_values($this->contact_forms));
user_role_revoke_permissions($this->created_role_rid, array_values($this->contact_forms));
user_role_revoke_permissions($this->created_role_2_rid, array_values($this->contact_forms));
}