You are here

function DrupalApacheSolrNodeAccess::setUp in Apache Solr Search 6

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.2 contrib/apachesolr_nodeaccess/tests/apachesolr_nodeaccess.test \DrupalApacheSolrNodeAccess::setUp()
  5. 7 apachesolr_access/tests/apachesolr_access.test \DrupalApacheSolrNodeAccess::setUp()

Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix. A temporary files directory is created with the same name as the database prefix.

Parameters

...: List of modules to enable for the duration of the test. This can be either a single array or a variable number of string arguments.

Overrides DrupalWebTestCase::setUp

File

contrib/apachesolr_nodeaccess/tests/apachesolr_nodeaccess.test, line 17
Tests for the apachsolr_nodeaccess module.

Class

DrupalApacheSolrNodeAccess
@file Tests for the apachsolr_nodeaccess module.

Code

function setUp() {
  parent::setUp('nodeaccess', 'apachesolr', 'apachesolr_search', 'apachesolr_nodeaccess');

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