You are here

function SearchCommentTestCase::setRolePermissions in Drupal 7

Set permissions for role.

1 call to SearchCommentTestCase::setRolePermissions()
SearchCommentTestCase::testSearchResultsCommentAccess in modules/search/search.test
Verify access rules for comment indexing with different permissions.

File

modules/search/search.test, line 914
Tests for search.module.

Class

SearchCommentTestCase
Test integration searching comments.

Code

function setRolePermissions($rid, $access_comments = FALSE, $search_content = TRUE) {
  $permissions = array(
    'access comments' => $access_comments,
    'search content' => $search_content,
  );
  user_role_change_permissions($rid, $permissions);
}