You are here

public function ForumAccessTestCase5::getInfo in Forum Access 6

Implements getInfo().

Change the grants to your wishes

1 call to ForumAccessTestCase5::getInfo()
ForumAccessTestCase5::testForumAccess in ./forum_access.test
Implements the Forum Access testing.

File

./forum_access.test, line 1635
Test file for forum_access.module.

Class

ForumAccessTestCase5

Code

public function getInfo() {
  $grants = array(
    'anonymous_view' => FALSE,
    'anonymous_create' => FALSE,
    'anonymous_update' => FALSE,
    'anonymous_delete' => FALSE,
    'authenticated_view' => TRUE,
    'authenticated_create' => TRUE,
    'authenticated_update' => TRUE,
    'authenticated_delete' => FALSE,
  );
  $grants_string = implode(', ', array_keys(array_filter($grants, create_function('$grant', 'return $grant;'))));
  if (empty($grants_string)) {
    $grants_string = t('none');
  }
  return array(
    'name' => t('Forum access functionality #5'),
    'description' => t('Test forum access with the following grants: @grants_string', array(
      '@grants_string' => $grants_string,
    )),
    'group' => t('Forum access'),
  );
}