You are here

private function ForumAccessTestCase::testForumAccessGetPermissionsAnonymousUser in Forum Access 6

This function gets the permissions for the anonymous userrole from the database

1 call to ForumAccessTestCase::testForumAccessGetPermissionsAnonymousUser()
ForumAccessTestCase::testForumAccessDumpDebugInfo in ./forum_access.test
This function is called when the program detects an error. It gives extra information so that the error can be fixed. hopefully :)

File

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

Class

ForumAccessTestCase
This is the base class for forum access testing.

Code

private function testForumAccessGetPermissionsAnonymousUser($if_empty_return_none = FALSE) {
  $result = db_fetch_object(db_query("SELECT perm FROM {permission} WHERE rid = %d", DRUPAL_ANONYMOUS_RID));
  if (!empty($result->perm)) {
    return explode(', ', $result->perm);
  }
  elseif ($if_empty_return_none) {
    return array(
      t('none'),
    );
  }
  return array();
}