MDL-16483 - stopped using MoodleUnitTestCase in tests where $DB not needed

This commit is contained in:
skodak
2009-01-10 13:23:37 +00:00
parent a4081abfde
commit cc4245a3cd
10 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -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(
+2 -2
View File
@@ -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());
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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(
+1 -1
View File
@@ -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
}
+1 -1
View File
@@ -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');
+1 -1
View File
@@ -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() {
}
+1 -1
View File
@@ -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() {
}