function DrupalApacheSolrNodeAccess::setUp in Apache Solr Search 6.3
Same name and namespace in other branches
- 8 apachesolr_access/tests/apachesolr_access.test \DrupalApacheSolrNodeAccess::setUp()
- 5 contrib/apachesolr_nodeaccess/tests/apachesolr_nodeaccess.test \DrupalApacheSolrNodeAccess::setUp()
- 6 contrib/apachesolr_nodeaccess/tests/apachesolr_nodeaccess.test \DrupalApacheSolrNodeAccess::setUp()
- 6.2 contrib/apachesolr_nodeaccess/tests/apachesolr_nodeaccess.test \DrupalApacheSolrNodeAccess::setUp()
- 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
- apachesolr_access/
tests/ apachesolr_access.test, line 16 - 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('content', 'anode_access_test', 'search', 'apachesolr', 'apachesolr_search', 'apachesolr_access');
require_once dirname(dirname(dirname(realpath(__FILE__)))) . '/Apache_Solr_Document.php';
apachesolr_load_service_class('', array(
'file' => 'tests/Dummy_Solr',
'module' => 'apachesolr',
'class' => 'DummySolr',
));
// 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);
// Create an admin user.
$permissions = array(
'access content',
'search content',
'administer nodes',
'administer search',
'access administration pages',
);
$this->admin_user = $this
->drupalCreateUser($permissions);
}