Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.6.5, 2.7.2
-
MOODLE_26_STABLE, MOODLE_27_STABLE
-
MOODLE_26_STABLE, MOODLE_27_STABLE
-
47608-28
-
-
Easy
-
Description
If you configure Moodle to run MongoDB cache_store tests and then attempt to run the tests before starting the Mongo service you get a fatal error.
vendor/bin/phpunit cache/stores/mongodb/tests/mongodb_test.php
Moodle 2.8dev (Build: 20141002), pgsql, 71900d9202b9315c958c8326725b74e4b096454b
PHPUnit 3.7.37 by Sebastian Bergmann.Configuration read from /var/www/integration/phpunit.xml
PHP Fatal error: Call to a member function selectDB() on a non-object in /var/www/integration/cache/stores/mongodb/lib.php on line 206
Fatal error: Call to a member function selectDB() on a non-object in /var/www/integration/cache/stores/mongodb/lib.php on line 206
The mongodb test need to be amended to check the store is ready before tying to use it.