You are here

public function ForumAccessTestCase4::getInfo in Forum Access 6

Implements getInfo().

Change the grants to your wishes

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

File

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

Class

ForumAccessTestCase4

Code

public function getInfo() {
  $grants = array(
    'anonymous_view' => TRUE,
    'anonymous_create' => FALSE,
    'anonymous_update' => FALSE,
    'anonymous_delete' => FALSE,
    'authenticated_view' => TRUE,
    'authenticated_create' => TRUE,
    'authenticated_update' => FALSE,
    '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 #4'),
    'description' => t('Test forum access with the following grants: @grants_string', array(
      '@grants_string' => $grants_string,
    )),
    'group' => t('Forum access'),
  );
}