BUGFIX: Fixed dates in DateTest so that they don't trip up on timezone quirks, since those are more to do with our buildslave than bugs in SilverStripe

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72679 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2009-03-09 07:32:51 +00:00
parent 553f2e74af
commit 3e596ba66c

View File

@ -8,10 +8,10 @@ class DateTest extends SapphireTest {
function testNiceDate() {
/* Test the DD/MM/YYYY formatting of Date::Nice() */
$cases = array(
1206961400 => '01/04/2008', // timestamp integers work as well!
1206875000 => '31/03/2008',
'1206961300' => '01/04/2008', // a timestamp as a string, not an integer
'1206875000' => '31/03/2008',
1206968400 => '01/04/2008', // timestamp integers work as well!
1206882000 => '31/03/2008',
'1206968400' => '01/04/2008', // a timestamp as a string, not an integer
'1206882000' => '31/03/2008',
'4/3/03' => '04/03/2003', // D/M/YY format
'04/03/03' => '04/03/2003', // DD/MM/YY format
'4/3/03' => '04/03/2003', // D/M/YY format
@ -33,10 +33,10 @@ class DateTest extends SapphireTest {
function testLongDate() {
/* "24 May 2006" style formatting of Date::Long() */
$cases = array(
1206961400 => '1 April 2008',
'1206961400' => '1 April 2008',
1206875000 => '31 March 2008',
'1206875000' => '31 March 2008',
1206968400 => '1 April 2008',
'1206968400' => '1 April 2008',
1206882000 => '31 March 2008',
'1206882000' => '31 March 2008',
'2003-4-3' => '3 April 2003',
'3/4/2003' => '3 April 2003',
);