function SearchCommentTestCase::setRolePermissions

7.x search.test SearchCommentTestCase::setRolePermissions($rid, $access_comments = FALSE, $search_content = TRUE)

Set permissions for role.

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

File

drupal-7.x/modules/search/search.test, line 884
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);
}