You are here

function ContactAttachSettingsFormTestCase::runSettingsFormTestForRole in Contact Attach 7

Tests the module settings form for the specified role.

Parameters

$role: A fully-loaded role object as returned by user_role_load().

1 call to ContactAttachSettingsFormTestCase::runSettingsFormTestForRole()
ContactAttachSettingsFormTestCase::checkPermittedRoleOnSettingsPage in ./contact_attach.test
Checks if the role is listed on the settings page when having permissions.

File

./contact_attach.test, line 204
Tests for the Contact Attach module.

Class

ContactAttachSettingsFormTestCase
Tests the Contact Attach settings form.

Code

function runSettingsFormTestForRole($role) {
  $this
    ->assertNoUniqueText(t('Settings for the @role role', array(
    '@role' => $role->name,
  )));

  // Post valid values and assert that they are stored.
  $this
    ->postValidRoleSettings($role);

  // Post invalid values and assert that they are caught by the validator.
  $this
    ->postInvalidRoleSettings($role);
}