BUGFIX Disabled PHPUnit backup of global variables, which caused i18n::_t() calls in subsequent test cases to fail because of a cached empty global

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85330 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-08-27 04:45:58 +00:00
parent 83aa90f1b2
commit 1a7418c18b

View File

@ -31,6 +31,14 @@ class SapphireTest extends PHPUnit_Framework_TestCase {
protected static $is_running_test = false;
/**
* We need to disabling backing up of globals to avoid overriding
* the few globals SilverStripe relies on, like $lang for the i18n subsystem.
*
* @see http://sebastian-bergmann.de/archives/797-Global-Variables-and-PHPUnit.html
*/
protected $backupGlobals = FALSE;
public static function is_running_test() {
return self::$is_running_test;
}