You are here

protected function DrupalSolrDocumentTest::setUp in Apache Solr Search 7

Same name and namespace in other branches
  1. 8 tests/solr_document.test \DrupalSolrDocumentTest::setUp()
  2. 6.3 tests/solr_document.test \DrupalSolrDocumentTest::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_document.test, line 18
Unit tests for document object methods.

Class

DrupalSolrDocumentTest
@file Unit tests for document object methods.

Code

protected function setUp() {
  parent::setUp();
  require_once dirname(dirname(realpath(__FILE__))) . '/apachesolr.module';
  require_once dirname(dirname(realpath(__FILE__))) . '/Apache_Solr_Document.php';
}