From 488104d952084864526d6eb09b3aa2d4c766279e Mon Sep 17 00:00:00 2001 From: Trevor Parscal Date: Thu, 30 Sep 2010 21:58:32 +0000 Subject: [PATCH] Added tests for new TS_ISO_8601_BASIC timestamp format added in r74043 (and fixed in r74045) --- maintenance/tests/phpunit/includes/GlobalTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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() { -- 2.20.1