function ContentAccessTestCase::changeAccessNodeKeyword in Content Access 7
Same name and namespace in other branches
- 5 tests/content_access_test_help.php \ContentAccessTestCase::changeAccessNodeKeyword()
- 6 tests/content_access_test_help.php \ContentAccessTestCase::changeAccessNodeKeyword()
Change access permissions for a node by a given keyword (view, update or delete)
3 calls to ContentAccessTestCase::changeAccessNodeKeyword()
- ContentAccessModuleTestCase::testDeleteAccess in tests/
content_access.test - Test for deleting nodes.
- ContentAccessModuleTestCase::testEditAccess in tests/
content_access.test - Test for editing nodes.
- ContentAccessModuleTestCase::testViewAccess in tests/
content_access.test - Test for viewing nodes.
File
- tests/
content_access_test_help.php, line 104 - Helper class with auxiliary functions for content access module tests
Class
- ContentAccessTestCase
- @file Helper class with auxiliary functions for content access module tests
Code
function changeAccessNodeKeyword($node, $keyword, $access = TRUE) {
$user = $this->test_user;
$roles[$this->rid] = $user->roles[$this->rid];
$access_settings = array(
$keyword . '[' . key($roles) . ']' => $access,
);
$this
->changeAccessNode($node, $access_settings);
}