MDL-16483 - stopped using MoodleUnitTestCase in tests where $DB not needed
This commit is contained in:
@@ -42,7 +42,7 @@ require_once($CFG->libdir . '/ajax/ajaxlib.php');
|
||||
* @author Petr Skoda (skodak)
|
||||
* @version $Id$
|
||||
*/
|
||||
class ajaxlib_test extends MoodleUnitTestCase {
|
||||
class ajax_test extends UnitTestCase {
|
||||
function test_ajax_get_lib() {
|
||||
global $CFG;
|
||||
$cases = array(
|
||||
|
||||
@@ -216,7 +216,7 @@ class portfoliolib_test extends MoodleUnitTestCase {
|
||||
protected function setup_caller($class, $callbackargs, $user=null) {
|
||||
global $DB;
|
||||
$caller = new $class($callbackargs);
|
||||
$caller->set('exporter', new partialmock_exporter(&$this));
|
||||
$caller->set('exporter', new partialmock_exporter($this));
|
||||
if (is_numeric($user)) {
|
||||
$user = $DB->get_record('user', array('id' => $user));
|
||||
}
|
||||
@@ -236,7 +236,7 @@ class portfoliolib_test extends MoodleUnitTestCase {
|
||||
foreach ($plugins as $plugin) {
|
||||
// Instantiate a fake plugin instance
|
||||
$plugin_class = "partialmock_plugin_$plugin";
|
||||
$plugin = new $plugin_class(&$this);
|
||||
$plugin = new $plugin_class($this);
|
||||
|
||||
// figure out our format intersection and test all of them.
|
||||
$formats = portfolio_supported_formats_intersect($this->caller->supported_formats(), $plugin->supported_formats());
|
||||
|
||||
@@ -12,7 +12,7 @@ if (!defined('MOODLE_INTERNAL')) {
|
||||
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
|
||||
}
|
||||
|
||||
class slow_code_test extends MoodleUnitTestCase {
|
||||
class slow_code_test extends UnitTestCase {
|
||||
var $php_code_extensions = array('php', 'html', 'php\.inc');
|
||||
var $ignore_folders = array();
|
||||
var $phppath;
|
||||
|
||||
@@ -12,7 +12,7 @@ require_once($CFG->libdir . '/mathslib.php');
|
||||
* @author Petr Skoda (skodak)
|
||||
* @version $Id$
|
||||
*/
|
||||
class mathsslib_test extends MoodleUnitTestCase {
|
||||
class mathsslib_test extends UnitTestCase {
|
||||
|
||||
/**
|
||||
* Tests the basic formula evaluation
|
||||
|
||||
@@ -39,7 +39,7 @@ if (!defined('MOODLE_INTERNAL')) {
|
||||
|
||||
require_once($CFG->libdir . '/moodlelib.php');
|
||||
|
||||
class moodlelib_test extends MoodleUnitTestCase {
|
||||
class moodlelib_test extends UnitTestCase {
|
||||
|
||||
var $user_agents = array(
|
||||
'MSIE' => array(
|
||||
|
||||
@@ -58,7 +58,7 @@ class repositorylib_test extends MoodleUnitTestCase {
|
||||
foreach ($plugins as $plugin) {
|
||||
// Instantiate a fake plugin instance
|
||||
$plugin_class = "partialmock_$plugin";
|
||||
$plugin = new $plugin_class(&$this);
|
||||
$plugin = new $plugin_class($this);
|
||||
|
||||
// add common plugin tests here
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ if (!defined('MOODLE_INTERNAL')) {
|
||||
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
|
||||
}
|
||||
|
||||
class web_test extends MoodleUnitTestCase {
|
||||
class web_test extends UnitTestCase {
|
||||
|
||||
function setUp() {
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php // $Id$
|
||||
require_once("$CFG->libdir/simpletest/portfolio_testclass.php");
|
||||
require_once("$CFG->dirroot.'/mod/data/lib.php");
|
||||
require_once("$CFG->dirroot/mod/data/lib.php");
|
||||
require_once("$CFG->dirroot/$CFG->admin/generator.php");
|
||||
|
||||
Mock::generate('data_portfolio_caller', 'mock_caller');
|
||||
|
||||
@@ -37,7 +37,7 @@ if (!defined('MOODLE_INTERNAL')) {
|
||||
|
||||
require_once($CFG->dirroot . '/mod/data/lib.php');
|
||||
|
||||
class data_preset_test extends MoodleUnitTestCase {
|
||||
class data_preset_test extends UnitTestCase {
|
||||
|
||||
function setUp() {
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ if (!defined('MOODLE_INTERNAL')) {
|
||||
|
||||
require_once($CFG->dirroot . '/mod/forum/lib.php');
|
||||
|
||||
class modforumlib_test extends MoodleUnitTestCase {
|
||||
class modforumlib_test extends UnitTestCase {
|
||||
|
||||
function setUp() {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user