Tests: Fix UserTest as getTimeZone now returns a DateTimeZone object

refs #4440
This commit is contained in:
Eric Lippmann 2013-08-07 17:19:16 +02:00
parent ba00fd39df
commit 3d104474d9
1 changed files with 3 additions and 2 deletions

View File

@ -6,6 +6,7 @@ require_once __DIR__ . '/../../../../library/Icinga/User.php';
require_once __DIR__ . '/../../../../library/Icinga/User/Preferences.php';
require_once __DIR__ . '/../../../../library/Icinga/User/Preferences/ChangeSet.php';
use \DateTimeZone;
use Icinga\User as IcingaUser;
use Icinga\User\Preferences as UserPreferences;
@ -49,7 +50,7 @@ class UserTest extends \PHPUnit_Framework_TestCase
$user = new IcingaUser('unittest');
$prefs = new UserPreferences(array());
$user->setPreferences($prefs);
$this->assertEquals($user->getTimeZone(), $defaultTz,
$this->assertEquals($user->getTimeZone(), new DateTimeZone($defaultTz),
'User\'s timezone does not match the default timezone'
);
}
@ -64,7 +65,7 @@ class UserTest extends \PHPUnit_Framework_TestCase
'timezone' => $explicitTz
));
$user->setPreferences($prefs);
$this->assertEquals($user->getTimeZone(), $explicitTz,
$this->assertEquals($user->getTimeZone(), new DateTimeZone($defaultTz),
'User\'s timezone does not match the timezone set by himself'
);
}