You are here

protected function DrupalWebTestCase::loadSetupCache in Drupal 7

Copies the cached tables and files for a cached installation setup.

Parameters

string $cache_key_prefix: (optional) Additional prefix for the cache key.

Return value

bool TRUE when the cache was usable and loaded, FALSE when cache was not available.

See also

DrupalWebTestCase::setUp()

1 call to DrupalWebTestCase::loadSetupCache()
DrupalWebTestCase::setUp in modules/simpletest/drupal_web_test_case.php
Sets up a Drupal site for running functional and integration tests.

File

modules/simpletest/drupal_web_test_case.php, line 1477

Class

DrupalWebTestCase
Test case for typical Drupal tests.

Code

protected function loadSetupCache($cache_key_prefix = '') {
  $cache_key = $this
    ->getSetupCacheKey($cache_key_prefix);
  $cache_file = $this->originalFileDirectory . '/simpletest/' . $cache_key . '/simpletest-cache-setup';
  if (file_exists($cache_file)) {
    return $this
      ->copySetupCache($cache_key, substr($this->databasePrefix, 10));
  }
  return FALSE;
}