Merge "Add method parameter type documentation"
[lhc/web/wiklou.git] / tests / phpunit / includes / json / FormatJsonTest.php
index 0782e4e..eb024ab 100644 (file)
@@ -19,10 +19,8 @@ class FormatJsonTest extends MediaWikiTestCase {
                // 4 space indent, no trailing whitespace, no trailing linefeed
                $json = '{
     "emptyObject": {
-
     },
     "emptyArray": [
-
     ],
     "string": "foobar\\\\",
     "filledArray": [
@@ -35,7 +33,7 @@ class FormatJsonTest extends MediaWikiTestCase {
 }';
 
                $json = str_replace( "\r", '', $json ); // Windows compat
-               $this->assertSame( $json, FormatJson::encode( $obj, true ) );
+               $this->assertSame( $json, str_replace("\n\n", "\n", FormatJson::encode( $obj, true ) ));
        }
 
        public static function provideEncodeDefault() {
@@ -88,7 +86,6 @@ class FormatJsonTest extends MediaWikiTestCase {
                        strtolower( FormatJson::encode( "\xf0\xa0\x80\x80" ) ),
                        'Test encoding an broken json_encode character (U+20000)'
                );
-
        }
 
        public function testDecodeReturnType() {
@@ -156,6 +153,7 @@ class FormatJsonTest extends MediaWikiTestCase {
                                $cases[] = array( $from, '"' . ( $leaveUnescaped ? $from : $to ) . '"' );
                        }
                }
+
                return $cases;
        }
 }