You are here

public function AcquiaSearchWebTestCase::setUp in Acquia Search 6.3

Overrides DrupalTestCase::setUp().

Overrides DrupalWebTestCase::setUp

File

tests/acquia_search.test, line 120

Class

AcquiaSearchWebTestCase
Tests the functionality of the Acquia Search module.

Code

public function setUp() {
  parent::setUp('acquia_agent', 'search', 'content', 'apachesolr', 'apachesolr_search', 'acquia_search');

  // Generate and store a random set of credentials.
  $this->id = AcquiaSearchUnitTestCase::randomAcquiaSearchName(10);
  $this->key = AcquiaSearchUnitTestCase::randomAcquiaSearchName(32);
  $this->salt = AcquiaSearchUnitTestCase::randomAcquiaSearchName(32);
  $this->derivedKey = _acquia_search_create_derived_key($this->salt, $this->id, $this->key);
  $subscription = array(
    'timestamp' => REQUEST_TIME - 60,
    'active' => '1',
  );
  variable_set('acquia_identifier', $this->id);
  variable_set('acquia_key', $this->key);
  variable_set('acquia_subscription_data', $subscription);
  $environment = acquia_search_get_environment();
  $this->url = $environment['url'];
}