You are here

function node_test_node_grants in Drupal 7

Same name and namespace in other branches
  1. 8 core/modules/node/tests/modules/node_test/node_test.module \node_test_node_grants()
  2. 9 core/modules/node/tests/modules/node_test/node_test.module \node_test_node_grants()

Implements hook_node_grants().

1 call to node_test_node_grants()
NodeAccessRecordsTestCase::testNodeAccessRecords in modules/node/node.test
Creates a node and tests the creation of node access rules.

File

modules/node/tests/node_test.module, line 57
A dummy module for testing node related hooks.

Code

function node_test_node_grants($account, $op) {

  // Give everyone full grants so we don't break other node tests.
  // Our node access tests asserts three realms of access.
  // See testGrantAlter().
  return array(
    'test_article_realm' => array(
      1,
    ),
    'test_page_realm' => array(
      1,
    ),
    'test_alter_realm' => array(
      2,
    ),
  );
}