Chad has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/87601


Change subject: Strip excess newlines from formatting test
......................................................................

Strip excess newlines from formatting test

The result's basically the same either way, only difference is
things like

 "emptyObject": {

 },

Are now

 "emptyObject": {
 },

Results are still pretty, now passes in both Zend and HHVM

Change-Id: I6afa0fd49a7aef3f6b7ca1b4574f3de555521348
---
M tests/phpunit/includes/json/FormatJsonTest.php
1 file changed, 1 insertion(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/01/87601/1

diff --git a/tests/phpunit/includes/json/FormatJsonTest.php 
b/tests/phpunit/includes/json/FormatJsonTest.php
index ef263c4..eb024ab 100644
--- a/tests/phpunit/includes/json/FormatJsonTest.php
+++ b/tests/phpunit/includes/json/FormatJsonTest.php
@@ -19,10 +19,8 @@
                // 4 space indent, no trailing whitespace, no trailing linefeed
                $json = '{
     "emptyObject": {
-
     },
     "emptyArray": [
-
     ],
     "string": "foobar\\\\",
     "filledArray": [
@@ -35,7 +33,7 @@
 }';
 
                $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() {

-- 
To view, visit https://gerrit.wikimedia.org/r/87601
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6afa0fd49a7aef3f6b7ca1b4574f3de555521348
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Chad <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to