diff options
author | Jaime Perez Crespo <jaime.perez@uninett.no> | 2016-03-04 15:09:54 +0100 |
---|---|---|
committer | Jaime Perez Crespo <jaime.perez@uninett.no> | 2016-03-04 15:09:54 +0100 |
commit | 3003f3fa73445986b2e98db6d947f5fd75aa7369 (patch) | |
tree | 8f733978157a53eea84a214312347242493f2d34 /tests/lib/SimpleSAML | |
parent | b31d663c25be26d1740df32f2211d5c116f35073 (diff) | |
download | simplesamlphp-3003f3fa73445986b2e98db6d947f5fd75aa7369.zip simplesamlphp-3003f3fa73445986b2e98db6d947f5fd75aa7369.tar.gz simplesamlphp-3003f3fa73445986b2e98db6d947f5fd75aa7369.tar.bz2 |
Fix mistake in the test just added.
Diffstat (limited to 'tests/lib/SimpleSAML')
-rw-r--r-- | tests/lib/SimpleSAML/Utils/TimeTest.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/lib/SimpleSAML/Utils/TimeTest.php b/tests/lib/SimpleSAML/Utils/TimeTest.php index 17cbc6e..89dc964 100644 --- a/tests/lib/SimpleSAML/Utils/TimeTest.php +++ b/tests/lib/SimpleSAML/Utils/TimeTest.php @@ -30,14 +30,15 @@ class TimeTest extends \PHPUnit_Framework_TestCase public function testInitTimezon() { $tz = 'UTC'; - if (@date_default_timezone_get() === 'UTC') { // avoid collisions + $os = @date_default_timezone_get(); + if ($os === 'UTC') { // avoid collisions $tz = 'Europe/Oslo'; } // test guessing timezone from the OS - \SimpleSAML_Configuration::loadFromArray(array('timezone' => 'Europe/Madrid'), '[ARRAY]', 'simplesaml'); + \SimpleSAML_Configuration::loadFromArray(array('timezone' => null), '[ARRAY]', 'simplesaml'); @Time::initTimezone(); - $this->assertEquals('Europe/Madrid', @date_default_timezone_get()); + $this->assertEquals($os, @date_default_timezone_get()); // clear initialization $c = new \ReflectionProperty('\SimpleSAML\Utils\Time', 'tz_initialized'); |