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
This commit is contained in:
parent
dc818654ab
commit
c370ad21d7
1 changed files with 1 additions and 3 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue