MDL-49828 timezones: fix messed up phpunit detection

This commit is contained in:
Petr Skoda
2015-04-12 12:37:32 +12:00
parent e49cb057a1
commit 75a1e85e3a
+2 -1
View File
@@ -296,7 +296,8 @@ class core_date {
* To be called from lib/setup.php only!
*/
public static function store_default_php_timezone() {
if (defined('PHPUNIT_TEST') or defined('BEHAT_SITE_RUNNING') or defined('BEHAT_TEST') or defined('BEHAT_UTIL')) {
if ((defined('PHPUNIT_TEST') and PHPUNIT_TEST)
or defined('BEHAT_SITE_RUNNING') or defined('BEHAT_TEST') or defined('BEHAT_UTIL')) {
// We want all test sites to be consistent by default.
self::$defaultphptimezone = 'Australia/Perth';
return;