http://www.mediawiki.org/wiki/Special:Code/MediaWiki/74046
Revision: 74046
Author: tparscal
Date: 2010-09-30 21:58:32 +0000 (Thu, 30 Sep 2010)
Log Message:
-----------
Added tests for new TS_ISO_8601_BASIC timestamp format added in r74043 (and
fixed in r74045)
Modified Paths:
--------------
trunk/phase3/maintenance/tests/phpunit/includes/GlobalTest.php
Modified: trunk/phase3/maintenance/tests/phpunit/includes/GlobalTest.php
===================================================================
--- trunk/phase3/maintenance/tests/phpunit/includes/GlobalTest.php
2010-09-30 21:32:19 UTC (rev 74045)
+++ trunk/phase3/maintenance/tests/phpunit/includes/GlobalTest.php
2010-09-30 21:58:32 UTC (rev 74046)
@@ -153,6 +153,10 @@
'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 @@
'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 @@
'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() {
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs