1 node.test NodeAccessUnitTest::assertNodeAccess($ops, $node, $account)

Asserts node_access() correctly grants or denies access.

File

core/modules/node/tests/node.test, line 1188
Tests for node.module.

Class

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