function SearchCommentTest::setRolePermissions in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/search/src/Tests/SearchCommentTest.php \Drupal\search\Tests\SearchCommentTest::setRolePermissions()
Set permissions for role.
1 call to SearchCommentTest::setRolePermissions()
- SearchCommentTest::testSearchResultsCommentAccess in core/
modules/ search/ src/ Tests/ SearchCommentTest.php - Verify access rules for comment indexing with different permissions.
File
- core/
modules/ search/ src/ Tests/ SearchCommentTest.php, line 283 - Contains \Drupal\search\Tests\SearchCommentTest.
Class
- SearchCommentTest
- Tests integration searching comments.
Namespace
Drupal\search\TestsCode
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);
}