Merge "Always show exceptions of type 'error' in LTR"
[lhc/web/wiklou.git] / tests / phpunit / includes / MessageTest.php
index 4fe806c..2d45c2e 100644 (file)
@@ -51,6 +51,10 @@ class MessageTest extends MediaWikiLangTestCase {
                                [],
                                [],
                        ],
+                       [
+                               [],
+                               [ [] ],
+                       ],
                        [
                                [ 'foo' ],
                                [ 'foo' ],
@@ -68,19 +72,37 @@ class MessageTest extends MediaWikiLangTestCase {
                                [ [ 'baz', 'foo' ] ],
                        ],
                        [
-                               [ 'baz', 'foo' ],
+                               [ Message::rawParam( 'baz' ) ],
+                               [ Message::rawParam( 'baz' ) ],
+                       ],
+                       [
+                               [ Message::rawParam( 'baz' ), 'foo' ],
+                               [ Message::rawParam( 'baz' ), 'foo' ],
+                       ],
+                       [
+                               [ Message::rawParam( 'baz' ) ],
+                               [ [ Message::rawParam( 'baz' ) ] ],
+                       ],
+                       [
+                               [ Message::rawParam( 'baz' ), 'foo' ],
+                               [ [ Message::rawParam( 'baz' ), 'foo' ] ],
+                       ],
+
+                       // Test handling of erroneous input, to detect if it changes
+                       [
+                               [ [ 'baz', 'foo' ], 'hhh' ],
                                [ [ 'baz', 'foo' ], 'hhh' ],
                        ],
                        [
-                               [ 'baz', 'foo' ],
+                               [ [ 'baz', 'foo' ], 'hhh', [ 'ahahahahha' ] ],
                                [ [ 'baz', 'foo' ], 'hhh', [ 'ahahahahha' ] ],
                        ],
                        [
-                               [ 'baz', 'foo' ],
+                               [ [ 'baz', 'foo' ], [ 'ahahahahha' ] ],
                                [ [ 'baz', 'foo' ], [ 'ahahahahha' ] ],
                        ],
                        [
-                               [ 'baz' ],
+                               [ [ 'baz' ], [ 'ahahahahha' ] ],
                                [ [ 'baz' ], [ 'ahahahahha' ] ],
                        ],
                ];