public function AcquiaSearchUnitTestCase::setUp in Acquia Connector 7.3
Same name and namespace in other branches
- 7.2 acquia_search/tests/acquia_search.test \AcquiaSearchUnitTestCase::setUp()
Overrides DrupalTestCase::setUp().
Overrides DrupalUnitTestCase::setUp
File
- acquia_search/
tests/ acquia_search.test, line 57 - Tests for the Acquia Search module.
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';
require_once dirname(dirname(__FILE__)) . '/src/PreferredSearchCoreService.php';
if (!function_exists('acquia_agent_settings')) {
module_load_include('module', 'acquia_agent');
}
// 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
->randomName(10);
// Most of the keys and salts have a 32char lenght.
$this->key = $this
->randomName(32);
$this->salt = $this
->randomName(32);
// Create a derived key from these values.
$this->derivedKey = _acquia_search_create_derived_key($this->salt, $this->id, $this->key);
}