mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
83aa90f1b2
commit
1a7418c18b
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user