Skip to content

Commit

Permalink
MDL-49828 timezones: fix messed up phpunit detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Petr Skoda committed Apr 12, 2015
1 parent e49cb05 commit 75a1e85
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/classes/date.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,8 @@ public static function get_default_php_timezone() {
* 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;
Expand Down

0 comments on commit 75a1e85

Please sign in to comment.