You are here

protected function ForumAccessTestCase::testForumAccessGetGrants in Forum Access 6

This function gets the forum grants from the input string

7 calls to ForumAccessTestCase::testForumAccessGetGrants()
ForumAccessTestCase1::testForumAccess in ./forum_access.test
Implements the Forum Access testing.
ForumAccessTestCase2::testForumAccess in ./forum_access.test
Implements the Forum Access testing.
ForumAccessTestCase3::testForumAccess in ./forum_access.test
Implements the Forum Access testing.
ForumAccessTestCase4::testForumAccess in ./forum_access.test
Implements the Forum Access testing.
ForumAccessTestCase5::testForumAccess in ./forum_access.test
Implements the Forum Access testing.

... See full list

File

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

Class

ForumAccessTestCase
This is the base class for forum access testing.

Code

protected function testForumAccessGetGrants($grants_string = '') {
  $grants = array();
  $grants['anonymous_view'] = stristr($grants_string, 'anonymous_view') === FALSE ? FALSE : TRUE;
  $grants['anonymous_create'] = stristr($grants_string, 'anonymous_create') === FALSE ? FALSE : TRUE;
  $grants['anonymous_update'] = stristr($grants_string, 'anonymous_update') === FALSE ? FALSE : TRUE;
  $grants['anonymous_delete'] = stristr($grants_string, 'anonymous_delete') === FALSE ? FALSE : TRUE;
  $grants['authenticated_view'] = stristr($grants_string, 'authenticated_view') === FALSE ? FALSE : TRUE;
  $grants['authenticated_create'] = stristr($grants_string, 'authenticated_create') === FALSE ? FALSE : TRUE;
  $grants['authenticated_update'] = stristr($grants_string, 'authenticated_update') === FALSE ? FALSE : TRUE;
  $grants['authenticated_delete'] = stristr($grants_string, 'authenticated_delete') === FALSE ? FALSE : TRUE;
  return $grants;
}