From 750a8f09ba69e1689f0588c172188243661ddffe Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 26 Nov 2006 01:13:51 +0000 Subject: [PATCH] Change the unit test to use a better date formatter --- UnitTest/DateTest.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/UnitTest/DateTest.php b/UnitTest/DateTest.php index 1ac3777..04d1997 100644 --- a/UnitTest/DateTest.php +++ b/UnitTest/DateTest.php @@ -13,6 +13,8 @@ class DateTest extends UnitTestCase { private $fixture; + const DATE_FORMAT = 'Y-m-d H:i:s'; + public function setUp() { $this->fixture = BSRegister::LoadModule('Date'); @@ -22,13 +24,13 @@ class DateTest extends UnitTestCase { $this->fixture->setUserTimeZone(0); - $this->assertEqual(gmdate('r', TIMENOW), $this->fixture->format('r', TIMENOW)); + $this->assertEqual(gmdate(self::DATE_FORMAT, TIMENOW), $this->fixture->format(self::DATE_FORMAT, TIMENOW)); } public function testGmtMinus8() { $this->fixture->setUserTimeZone(-8); - $this->assertEqual(date('r', TIMENOW), $this->fixture->format('r', TIMENOW)); + $this->assertEqual(date(self::DATE_FORMAT, TIMENOW), $this->fixture->format(self::DATE_FORMAT, TIMENOW)); } } -- 2.43.5