If you configured your site to run mongo unit tests and had
the mongo extension and backend installed but did not have the
mongo service running you would get a fatal error when running
the unit tests.
That problem has been fixed by checking the mongo test instance
is ready before returning it.
}
$store = new cachestore_mongodb('Test mongodb', $configuration);
}
$store = new cachestore_mongodb('Test mongodb', $configuration);
+ if (!$store->is_ready()) {
+ return false;
+ }
$store->initialise($definition);
return $store;
$store->initialise($definition);
return $store;
$configuration['usesafe'] = 1;
$store = new cachestore_mongodb('Test mongodb', $configuration);
$configuration['usesafe'] = 1;
$store = new cachestore_mongodb('Test mongodb', $configuration);
+ if (!$store->is_ready()) {
+ return false;
+ }
$store->initialise($definition);
return $store;
$store->initialise($definition);
return $store;