You are here

final private function Redis_Tests_AbstractUnitTestCase::prepareDrupalEnvironment in Redis 7.3

Same name and namespace in other branches
  1. 7.2 lib/Redis/Tests/AbstractUnitTestCase.php \Redis_Tests_AbstractUnitTestCase::prepareDrupalEnvironment()

Prepare Drupal environmment for testing

1 call to Redis_Tests_AbstractUnitTestCase::prepareDrupalEnvironment()
Redis_Tests_AbstractUnitTestCase::setUp in lib/Redis/Tests/AbstractUnitTestCase.php
Sets up unit test environment.

File

lib/Redis/Tests/AbstractUnitTestCase.php, line 56

Class

Redis_Tests_AbstractUnitTestCase

Code

private final function prepareDrupalEnvironment() {

  // Site on which the tests are running may define this variable
  // in their own settings.php file case in which it will be merged
  // with testing site
  global $conf;
  foreach (array_keys($this->originalConf) as $key) {
    if (isset($conf[$key])) {
      $this->originalConf[$key] = $conf[$key];
      unset($conf[$key]);
    }
  }
  $conf['cache_prefix'] = $this->testId;
}