function NodeQueryAlter::setUp

Overrides DrupalWebTestCase::setUp

File

modules/node/node.test, line 2278

Class

NodeQueryAlter
Tests node_query_node_access_alter().

Code

function setUp() {
    parent::setUp('node_access_test');
    node_access_rebuild();
    // Create some content.
    $this->drupalCreateNode();
    $this->drupalCreateNode();
    $this->drupalCreateNode();
    $this->drupalCreateNode();
    // Create user with simple node access permission. The 'node test view'
    // permission is implemented and granted by the node_access_test module.
    $this->accessUser = $this->drupalCreateUser(array(
        'access content overview',
        'access content',
        'node test view',
    ));
    $this->noAccessUser = $this->drupalCreateUser(array(
        'access content overview',
        'access content',
    ));
    $this->noAccessUser2 = $this->drupalCreateUser(array(
        'access content overview',
        'access content',
    ));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.