Skip to content

Commit 0288e88

Browse files
committed
Normalize line endings
1 parent fcecbd6 commit 0288e88

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/phpunit/JsonManipulatorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2171,7 +2171,7 @@ public function testAddMainKeyWithContentHavingDollarSignFollowedByDigit2()
21712171
"foo": "$1bar"
21722172
}
21732173
';
2174-
$this->assertEquals( str_replace( "\r\n", "\n", $expected ), str_replace( "\r\n", "\n", $manipulator->getContents() ) );
2174+
$this->assertEquals( preg_replace( '/\R/', "\n", $expected ), preg_replace( '/\R/', "\n", $manipulator->getContents() ) );
21752175
}
21762176

21772177
public function testUpdateMainKey()
@@ -2305,7 +2305,7 @@ public function testRemoveMainKey()
23052305
$expected = '{
23062306
}
23072307
';
2308-
$this->assertEquals( str_replace( "\r\n", "\n", $expected ), str_replace( "\r\n", "\n", $manipulator->getContents() ) );
2308+
$this->assertEquals( preg_replace( '/\R/', "\n", $expected ), preg_replace( '/\R/', "\n", $manipulator->getContents() ) );
23092309
}
23102310

23112311
public function testIndentDetection()

0 commit comments

Comments
 (0)