public function NodeaccesssRoleTestCase::testRoleNodeVisibilityViewEditAuthenticatedOnly in Nodeaccess 7
Test node access when authenticated only should have view/edit perms.
File
- tests/
nodeaccess_role.test, line 103 - Tests for the nodeaccess module.
Class
- NodeaccesssRoleTestCase
- Tests the functionality of the nodeaccess module.
Code
public function testRoleNodeVisibilityViewEditAuthenticatedOnly() {
$grants = array(
array(
'gid' => DRUPAL_ANONYMOUS_RID,
'realm' => 'nodeaccess_rid',
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
),
array(
'gid' => DRUPAL_AUTHENTICATED_RID,
'realm' => 'nodeaccess_rid',
'grant_view' => 1,
'grant_update' => 1,
'grant_delete' => 0,
),
);
nodeaccess_set_grants($this->node, $grants);
// Run all tests from grant.
$this
->checkRoleGrantAccesses($grants);
}