Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/lib/phpunit/classes/util.php b/lib/phpunit/classes/util.php
- index 844cc74ba94..e20d295f91d 100644
- --- a/lib/phpunit/classes/util.php
- +++ b/lib/phpunit/classes/util.php
- @@ -327,6 +327,8 @@ class phpunit_util extends testing_util {
- public static function bootstrap_init() {
- global $CFG, $SITE, $DB, $FULLME;
- + print_object ('BOOTSTRAP');
- +
- // backup the globals
- self::$globals['_SERVER'] = $_SERVER;
- self::$globals['CFG'] = clone($CFG);
- @@ -362,7 +364,15 @@ class phpunit_util extends testing_util {
- }
- if (isset(self::$globals[$name])) {
- if (is_object(self::$globals[$name])) {
- - $return = clone(self::$globals[$name]);
- + $return = unserialize(serialize(self::$globals[$name]));
- + if ($name == 'SITE') {
- + print_object(get_class(self::$globals[$name]));
- + if (isset($return->id)) {
- + if ($return->id != 1) {
- + print_object('SITE->id changed to ' . $return->id);
- + }
- + }
- + }
- return $return;
- } else {
- return self::$globals[$name];
Advertisement
Add Comment
Please, Sign In to add comment