From: Trevor Parscal Date: Thu, 30 Sep 2010 21:58:32 +0000 (+0000) Subject: Added tests for new TS_ISO_8601_BASIC timestamp format added in r74043 (and fixed... X-Git-Tag: 1.31.0-rc.0~34719 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=488104d952084864526d6eb09b3aa2d4c766279e;p=lhc%2Fweb%2Fwiklou.git Added tests for new TS_ISO_8601_BASIC timestamp format added in r74043 (and fixed in r74045) --- diff --git a/maintenance/tests/phpunit/includes/GlobalTest.php b/maintenance/tests/phpunit/includes/GlobalTest.php index 75d229b6b9..e41fbf1bec 100644 --- a/maintenance/tests/phpunit/includes/GlobalTest.php +++ b/maintenance/tests/phpunit/includes/GlobalTest.php @@ -153,6 +153,10 @@ class GlobalTest extends PHPUnit_Framework_TestCase { '2001-01-15 12:34:56', wfTimestamp( TS_DB, $t ), 'TS_UNIX to TS_DB' ); + $this->assertEquals( + '20010115T123456Z', + wfTimestamp( TS_ISO_8601_BASIC, $t ), + 'TS_ISO_8601_BASIC to TS_DB' ); $this->assertEquals( '20010115123456', @@ -166,6 +170,10 @@ class GlobalTest extends PHPUnit_Framework_TestCase { '2001-01-15 12:34:56', wfTimestamp( TS_DB, '20010115123456' ), 'TS_MW to TS_DB' ); + $this->assertEquals( + '20010115T123456Z', + wfTimestamp( TS_ISO_8601_BASIC, '20010115123456' ), + 'TS_MW to TS_ISO_8601_BASIC' ); $this->assertEquals( '20010115123456', @@ -179,6 +187,10 @@ class GlobalTest extends PHPUnit_Framework_TestCase { '2001-01-15 12:34:56', wfTimestamp( TS_DB, '2001-01-15 12:34:56' ), 'TS_DB to TS_DB' ); + $this->assertEquals( + '20010115T123456Z', + wfTimestamp( TS_ISO_8601_BASIC, '2001-01-15 12:34:56' ), + 'TS_DB to TS_ISO_8601_BASIC' ); } function testBasename() {