You are here

public function AcquiaSearchUnitTestCase::setUp in Acquia Search 6.3

Overrides DrupalTestCase::setUp().

Overrides DrupalUnitTestCase::setUp

File

tests/acquia_search.test, line 30

Class

AcquiaSearchUnitTestCase
Unit tests of the functionality of the Acquia Search module.

Code

public function setUp() {
  parent::setUp();
  require_once dirname(dirname(__FILE__)) . '/acquia_search.module';

  // Generate and store a random set of credentials.
  // Make them as close to the production values as possible
  // Something like AAAA-1234
  $this->id = $this
    ->randomAcquiaSearchName(10);

  // Most of the keys and salts have a 32char lenght
  $this->key = $this
    ->randomAcquiaSearchName(32);
  $this->salt = $this
    ->randomAcquiaSearchName(32);

  // Create a derived key from these values
  $this->derivedKey = _acquia_search_create_derived_key($this->salt, $this->id, $this->key);
}