Skip to content

Commit

Permalink
MDL-16483 - stopped using MoodleUnitTestCase in tests where $DB not n…
Browse files Browse the repository at this point in the history
…eeded
  • Loading branch information
skodak committed Jan 10, 2009
1 parent a4081ab commit cc4245a
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lib/ajax/simpletest/testajaxlib.php
Expand Up @@ -42,7 +42,7 @@
* @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(
Expand Down
4 changes: 2 additions & 2 deletions lib/simpletest/portfolio_testclass.php
Expand Up @@ -216,7 +216,7 @@ function test_construct_dupe_instance() {
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));
}
Expand All @@ -236,7 +236,7 @@ public function test_caller_with_plugins() {
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());
Expand Down
2 changes: 1 addition & 1 deletion lib/simpletest/slowtestcode.php
Expand Up @@ -12,7 +12,7 @@
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;
Expand Down
2 changes: 1 addition & 1 deletion lib/simpletest/testmathslib.php
Expand Up @@ -12,7 +12,7 @@
* @author Petr Skoda (skodak)
* @version $Id$
*/
class mathsslib_test extends MoodleUnitTestCase {
class mathsslib_test extends UnitTestCase {

/**
* Tests the basic formula evaluation
Expand Down
2 changes: 1 addition & 1 deletion lib/simpletest/testmoodlelib.php
Expand Up @@ -39,7 +39,7 @@

require_once($CFG->libdir . '/moodlelib.php');

class moodlelib_test extends MoodleUnitTestCase {
class moodlelib_test extends UnitTestCase {

var $user_agents = array(
'MSIE' => array(
Expand Down
2 changes: 1 addition & 1 deletion lib/simpletest/testrepositorylib.php
Expand Up @@ -58,7 +58,7 @@ public function test_plugins() {
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
}
Expand Down
2 changes: 1 addition & 1 deletion lib/simpletest/testweblib.php
Expand Up @@ -12,7 +12,7 @@
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() {
}
Expand Down
2 changes: 1 addition & 1 deletion mod/data/simpletest/test_data_portfolio_callers.php
@@ -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');
Expand Down
2 changes: 1 addition & 1 deletion mod/data/simpletest/testpreset.php
Expand Up @@ -37,7 +37,7 @@

require_once($CFG->dirroot . '/mod/data/lib.php');

class data_preset_test extends MoodleUnitTestCase {
class data_preset_test extends UnitTestCase {

function setUp() {
}
Expand Down
2 changes: 1 addition & 1 deletion mod/forum/simpletest/testmodforumlib.php
Expand Up @@ -39,7 +39,7 @@

require_once($CFG->dirroot . '/mod/forum/lib.php');

class modforumlib_test extends MoodleUnitTestCase {
class modforumlib_test extends UnitTestCase {

function setUp() {
}
Expand Down

0 comments on commit cc4245a

Please sign in to comment.