You are here

function DrupalApacheSolrNodeAccess::setUp in Apache Solr Search 7

Same name and namespace in other branches
  1. 8 apachesolr_access/tests/apachesolr_access.test \DrupalApacheSolrNodeAccess::setUp()
  2. 5 contrib/apachesolr_nodeaccess/tests/apachesolr_nodeaccess.test \DrupalApacheSolrNodeAccess::setUp()
  3. 6.3 apachesolr_access/tests/apachesolr_access.test \DrupalApacheSolrNodeAccess::setUp()
  4. 6 contrib/apachesolr_nodeaccess/tests/apachesolr_nodeaccess.test \DrupalApacheSolrNodeAccess::setUp()
  5. 6.2 contrib/apachesolr_nodeaccess/tests/apachesolr_nodeaccess.test \DrupalApacheSolrNodeAccess::setUp()

Defines what is required to start the DrupalApacheSolrNodeAccess test.

Overrides DrupalWebTestCase::setUp

File

apachesolr_access/tests/apachesolr_access.test, line 26
Unit tests for the access control functionalities that are added by apachesolr_access.

Class

DrupalApacheSolrNodeAccess
@file Unit tests for the access control functionalities that are added by apachesolr_access.

Code

function setUp() {
  parent::setUp('node_access_test', 'apachesolr', 'apachesolr_search', 'apachesolr_access');

  // Create a basic user, which is subject to moderation.
  $permissions = array(
    'access content',
    'create page content',
    'edit own page content',
    'create article content',
    'edit own article content',
  );
  $this->basic_user = $this
    ->drupalCreateUser($permissions);

  // Create an admin user.
  $permissions = array(
    'access content',
    'search content',
    'administer nodes',
    'administer search',
    'access administration pages',
  );
  $this->admin_user = $this
    ->drupalCreateUser($permissions);
}