Merge "Slight improvements to FormSpecialPage behavior."
[lhc/web/wiklou.git] / tests / phpunit / languages / LanguageTest.php
index 80f76a5..54f7753 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 
 class LanguageTest extends LanguageClassesTestCase {
-
        function testLanguageConvertDoubleWidthToSingleWidth() {
                $this->assertEquals(
                        "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
@@ -498,6 +497,30 @@ class LanguageTest extends LanguageClassesTestCase {
                );
        }
 
+       /**
+        * Test too short timestamp
+        * @expectedException MWException
+        */
+       function testSprintfDateTooShortTimestamp() {
+               $this->getLang()->sprintfDate( 'xiY', '1234567890123' );
+       }
+
+       /**
+        * Test too long timestamp
+        * @expectedException MWException
+        */
+       function testSprintfDateTooLongTimestamp() {
+               $this->getLang()->sprintfDate( 'xiY', '123456789012345' );
+       }
+
+       /**
+        * Test too short timestamp
+        * @expectedException MWException
+        */
+       function testSprintfDateNotAllDigitTimestamp() {
+               $this->getLang()->sprintfDate( 'xiY', '-1234567890123' );
+       }
+
        /**
         * @dataProvider provideSprintfDateSamples
         */