From ec3b241dc4541d05f30c9ee696bc5117fbe88007 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Wed, 1 Jul 2015 00:04:34 +0200 Subject: improve IXR_Date unittests --- _test/tests/inc/ixr_library_date.test.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to '_test') diff --git a/_test/tests/inc/ixr_library_date.test.php b/_test/tests/inc/ixr_library_date.test.php index fd5711212..0c81e6741 100644 --- a/_test/tests/inc/ixr_library_date.test.php +++ b/_test/tests/inc/ixr_library_date.test.php @@ -2,6 +2,9 @@ require_once DOKU_INC.'inc/IXR_Library.php'; +/** + * Class ixr_library_date_test + */ class ixr_library_date_test extends DokuWikiTest { @@ -19,7 +22,7 @@ class ixr_library_date_test extends DokuWikiTest { // with timezone array('2010-08-17 09:23:14+0000', 1282036994), array('2010-08-17 09:23:14+00:00', 1282036994), - array('2010-08-17 09:23:14+03:00', 1282036994), + array('2010-08-17 12:23:14+03:00', 1282036994), // no seconds array('2010-08-17T09:23', 1282036980), @@ -28,12 +31,12 @@ class ixr_library_date_test extends DokuWikiTest { // no time array('2010-08-17', 1282003200), array(1282036980, 1282036980), - //array('20100817', 1282003200), #this will NOT be parsed, but is assumed to be timestamp +// array('20100817', 1282003200), #this will NOT be parsed, but is assumed to be timestamp ); foreach($tests as $test){ $dt = new IXR_Date($test[0]); - $this->assertEquals($dt->getTimeStamp(),$test[1]); + $this->assertEquals($test[1], $dt->getTimeStamp()); } } -- cgit v1.2.3