Skip to content

Commit cb4ca34

Browse files
author
Sasha Anastasi
committed
cache_config: ensure cache is unready for storereqsnotmet test
1 parent 017a1c7 commit cb4ca34

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

classes/cache_config.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,12 +238,17 @@ private function generate_store_instance_config(array $stores): array {
238238

239239
// Create instance from this definition and confirm it instantiates correctly.
240240
$classinstance = new $classname($storearr['name'], $storearr['configuration']);
241-
if (!$classinstance->is_ready()) {
241+
$isready = $classinstance->is_ready();
242+
if (PHPUNIT_TEST && $storearr['name'] == 'apcutest') {
243+
$isready = false;
244+
}
245+
if ($isready) {
246+
$storesarr[$name] = $storearr;
247+
} else {
242248
// Store the errored store here. Later we will check if it can be safely removed from the array,
243249
// If its mappings are exclusively localisable.
244250
$this->storeerrors[] = $name;
245251
}
246-
$storesarr[$name] = $storearr;
247252
}
248253

249254
// Now instantiate the default stores (Must always exist).

0 commit comments

Comments
 (0)