You are here

function AbstractDrupalSolrOnlineWebTestCase::setUp in Apache Solr Search 6.3

Same name and namespace in other branches
  1. 8 tests/solr_index_and_search.test \AbstractDrupalSolrOnlineWebTestCase::setUp()
  2. 7 tests/solr_index_and_search.test \AbstractDrupalSolrOnlineWebTestCase::setUp()

Implementation of setUp().

Overrides DrupalWebTestCase::setUp

1 call to AbstractDrupalSolrOnlineWebTestCase::setUp()
DrupalSolrOnlineWebTestCase::setUp in tests/solr_index_and_search.test
Implementation of setUp().
1 method overrides AbstractDrupalSolrOnlineWebTestCase::setUp()
DrupalSolrOnlineWebTestCase::setUp in tests/solr_index_and_search.test
Implementation of setUp().

File

tests/solr_index_and_search.test, line 12

Class

AbstractDrupalSolrOnlineWebTestCase

Code

function setUp() {
  global $db_prefix;
  require_once dirname(dirname(realpath(__FILE__))) . '/apachesolr.interface.inc';
  require_once dirname(dirname(realpath(__FILE__))) . '/Apache_Solr_Document.php';
  require_once dirname(dirname(realpath(__FILE__))) . '/Drupal_Apache_Solr_Service.php';

  // Install modules needed for this test. This could have been passed in as
  // either a single array argument or a variable number of string arguments.
  // @todo Remove this compatibility layer in Drupal 8, and only accept
  // $modules as a single array argument.
  $modules = func_get_args();
  if (isset($modules[0]) && is_array($modules[0])) {
    $modules = $modules[0];
  }
  $modules[] = 'content';
  $modules[] = 'apachesolr';
  $modules[] = 'apachesolr_search';
  $modules[] = 'search';
  call_user_func_array('parent::setUp', $modules);
  $this->databasePrefix = $db_prefix;
}