Skip to content

Commit

Permalink
Update tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Oct 2, 2014
1 parent 53f2c44 commit 496a638
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions framework/ActiveSync/test/Horde/ActiveSync/DeviceTest.php
Expand Up @@ -125,8 +125,7 @@ public function testPoomContactsDate()
$device = new Horde_ActiveSync_Device($state, $fixture);
$date = new Horde_Date('2003-09-24', 'UTC');
$bday = $device->normalizePoomContactsDates($date);
$this->assertEquals('2003-09-24 00:00:00', (string)$bday);
$this->assertEquals('America/New_York', $bday->timezone);
$this->assertEquals('2003-09-24', $bday->setTimezone('America/New_York')->format('Y-m-d'));

// iOS (Sends as 00:00:00 localtime converted to UTC).
$fixture = array(
Expand All @@ -149,8 +148,7 @@ public function testPoomContactsDate()
$device = new Horde_ActiveSync_Device($state, $fixture);
$date = new Horde_Date('2003-09-24 08:00:00', 'UTC');
$bday = $device->normalizePoomContactsDates($date);
$this->assertEquals('2003-09-24 00:00:00', (string)$bday);
$this->assertEquals('Pacific/Honolulu', $bday->timezone);
$this->assertEquals('2003-09-24', $bday->setTimezone('Pacific/Honolulu')->format('Y-m-d'));

date_default_timezone_set('America/Chicago');
$fixture = array(
Expand All @@ -161,7 +159,7 @@ public function testPoomContactsDate()
$device = new Horde_ActiveSync_Device($state, $fixture);
$date = new Horde_Date('1970-03-20');
$bday = $device->normalizePoomContactsDates($date, true);
$this->assertEquals('1970-03-20 00:00:00', (string)$bday);
$this->assertEquals('1970-03-20 08:00:00', (string)$bday);

$fixture = array(
'deviceType' => 'Android',
Expand Down

0 comments on commit 496a638

Please sign in to comment.