diff --git a/classes/cache_config.php b/classes/cache_config.php index 9189b04..b21e0a8 100644 --- a/classes/cache_config.php +++ b/classes/cache_config.php @@ -238,12 +238,17 @@ private function generate_store_instance_config(array $stores): array { // Create instance from this definition and confirm it instantiates correctly. $classinstance = new $classname($storearr['name'], $storearr['configuration']); - if (!$classinstance->is_ready()) { + $isready = $classinstance->is_ready(); + if (PHPUNIT_TEST && $storearr['name'] == 'apcutest') { + $isready = false; + } + if ($isready) { + $storesarr[$name] = $storearr; + } else { // Store the errored store here. Later we will check if it can be safely removed from the array, // If its mappings are exclusively localisable. $this->storeerrors[] = $name; } - $storesarr[$name] = $storearr; } // Now instantiate the default stores (Must always exist).