]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-16483 - stopped using MoodleUnitTestCase in tests where $DB not needed
authorskodak <skodak>
Sat, 10 Jan 2009 13:23:37 +0000 (13:23 +0000)
committerskodak <skodak>
Sat, 10 Jan 2009 13:23:37 +0000 (13:23 +0000)
lib/ajax/simpletest/testajaxlib.php
lib/simpletest/portfolio_testclass.php
lib/simpletest/slowtestcode.php
lib/simpletest/testmathslib.php
lib/simpletest/testmoodlelib.php
lib/simpletest/testrepositorylib.php
lib/simpletest/testweblib.php
mod/data/simpletest/test_data_portfolio_callers.php
mod/data/simpletest/testpreset.php
mod/forum/simpletest/testmodforumlib.php

index 3014d967428ccba660318b6995ce8b228edeb12f..30969e3d1af70cbe4458db80c4b5a42b788cb85d 100644 (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(
index 7b45ce51da9a6049a6ba280142dfbdb2f622d2ae..c0dc3460d242466f447bfbebbc84fb5d66dfbbfa 100644 (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());
index 1c2faa3b7a55ef0b5a0bbb974fdcd61af3b8d4b0..d353853a04c17e9269ca4487fc68baa531a6011d 100644 (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;
index e15932bd9eb6dd520b0ebbadc41b47a121023ca4..77e91f55cd9150e0b76a1b247d7af9b5994efa22 100755 (executable)
@@ -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
index 8a37a167738637c36c8a4aa212d09a888af46d66..3f1f2fffd461c0c356cfa3860b4118ffec1208d2 100644 (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(
index d7e1a44cfdf2616371fb7491036ce7f17499b47f..447d113ffe60e6438135ef68da718ee35c288985 100644 (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
         }
index 7c01b1aba5c0c979b72e4d40269382ade28ba4c5..06e3b51ffb1d19e8b41c255837e403a28bffb40b 100644 (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() {
     }
index 8f1360cc1e6fdccb27ef514c517349321e896c1c..bb7cbc797ccc2cea48aefdfa28ee558a0619cc15 100644 (file)
@@ -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');
index 263ccf9d63c3be60d5044e53f3bae46252cf9741..efca3f2183bd899cc5d2f71a9343cab4fd39762a 100644 (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() {
     }
index b08ec912edd3fbce58bc83b66abc9261eaef08f6..7f490383ba5e16ba96958672b3ca35ea5e405516 100644 (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() {
     }