function SearchCommentTest::setRolePermissions

Set permissions for role.

1 call to SearchCommentTest::setRolePermissions()
SearchCommentTest::testSearchResultsCommentAccess in drupal/core/modules/search/lib/Drupal/search/Tests/SearchCommentTest.php
Verify access rules for comment indexing with different permissions.

File

drupal/core/modules/search/lib/Drupal/search/Tests/SearchCommentTest.php, line 183
Definition of Drupal\search\Tests\SearchCommentTest.

Class

SearchCommentTest
Test integration searching comments.

Namespace

Drupal\search\Tests

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);
}