You are here

function SolrBaseQueryTests::setUp in Apache Solr Search 7

Same name and namespace in other branches
  1. 8 tests/solr_base_query.test \SolrBaseQueryTests::setUp()
  2. 6.3 tests/solr_base_query.test \SolrBaseQueryTests::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_query.test, line 15

Class

SolrBaseQueryTests
Unit tests for query 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';
}