function NodeAccessTestCase::assertNodeAccess
Asserts node_access() correctly grants or denies access.
1 call to NodeAccessTestCase::assertNodeAccess()
- NodeAccessTestCase::testNodeAccess in modules/
node/ node.test - Runs basic tests for node_access function.
File
-
modules/
node/ node.test, line 1021
Class
- NodeAccessTestCase
- Tests basic node_access functionality.
Code
function assertNodeAccess($ops, $node, $account) {
foreach ($ops as $op => $result) {
$msg = format_string("node_access returns @result with operation '@op'.", array(
'@result' => $result ? 'true' : 'false',
'@op' => $op,
));
$this->assertEqual($result, node_access($op, $node, $account), $msg);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.