2 // This mongodb is part of Moodle - http://moodle.org/
4 // Moodle is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
9 // Moodle is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
20 * If you wish to use these unit tests all you need to do is add the following definition to
21 * your config.php file.
23 * define('TEST_CACHESTORE_MONGODB_TESTSERVER', 'mongodb://localhost:27017');
25 * @package cachestore_mongodb
26 * @copyright 2013 Sam Hemelryk
27 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
30 defined('MOODLE_INTERNAL') || die();
32 // Include the necessary evils.
34 require_once($CFG->dirroot.'/cache/tests/fixtures/stores.php');
35 require_once($CFG->dirroot.'/cache/stores/mongodb/lib.php');
38 * MongoDB unit test class.
40 * @package cachestore_mongodb
41 * @copyright 2013 Sam Hemelryk
42 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
44 class cachestore_mongodb_test extends cachestore_tests {
46 * Returns the MongoDB class name
49 protected function get_class_name() {
50 return 'cachestore_mongodb';