]>
src.bluestatic.org Git - isso.git/blob - UnitTest/DateTest.php
7 * @copyright Copyright (c)2002 - [#]year[#], Blue Static
12 class DateTest
extends UnitTestCase
16 const DATE_FORMAT
= 'Y-m-d H:i:s';
18 public function setUp()
20 $this->fixture
= BSRegister
::LoadModule('Date');
23 public function testGmtTimes()
25 $this->fixture
->setUserTimeZone(0);
27 $this->assertEqual(gmdate(self
::DATE_FORMAT
, TIMENOW
), $this->fixture
->format(self
::DATE_FORMAT
, TIMENOW
));
30 public function testGmtMinus8()
32 $this->fixture
->setUserTimeZone(-8);
33 $this->assertEqual(date(self
::DATE_FORMAT
, TIMENOW
), $this->fixture
->format(self
::DATE_FORMAT
, TIMENOW
));