You are here

function DrupalSolrFilterSubQueryTests::setUp in Apache Solr Search 7

Same name and namespace in other branches
  1. 8 tests/solr_base_subquery.test \DrupalSolrFilterSubQueryTests::setUp()
  2. 6.3 tests/solr_base_subquery.test \DrupalSolrFilterSubQueryTests::setUp()

Sets up unit test environment.

Unlike DrupalWebTestCase::setUp(), DrupalUnitTestCase::setUp() does not install modules because tests are performed without accessing the database. Any required files must be explicitly included by the child class setUp() method.

Overrides DrupalUnitTestCase::setUp

File

tests/solr_base_subquery.test, line 17
Unit tests for subquery object methods.

Class

DrupalSolrFilterSubQueryTests
@file Unit tests for subquery object methods.

Code

function setUp() {
  parent::setUp();
  require_once dirname(dirname(realpath(__FILE__))) . '/apachesolr.module';
  require_once dirname(dirname(realpath(__FILE__))) . '/apachesolr.interface.inc';
  require_once dirname(dirname(realpath(__FILE__))) . '/Solr_Base_Query.php';
  require_once dirname(dirname(realpath(__FILE__))) . '/Drupal_Apache_Solr_Service.php';
  require_once dirname(dirname(realpath(__FILE__))) . '/tests/Dummy_Solr.php';
}