Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Commit e82ad5e

Browse files
committed
Move test to its original place
1 parent 26a2e5c commit e82ad5e

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

test/JsonTest.php

+13-13
Original file line numberDiff line numberDiff line change
@@ -960,6 +960,19 @@ public function testJsonPrettyPrintWorksWithArrayNotationInStringLiteral()
960960
$this->assertSame($expected, $pretty);
961961
}
962962

963+
public function testPrettyPrintDoublequoteFollowingEscapedBackslashShouldNotBeTreatedAsEscaped()
964+
{
965+
$this->assertEquals(
966+
"[\n 1,\n \"\\\\\",\n 3\n]",
967+
Json\Json::prettyPrint(Json\Json::encode([1, '\\', 3]))
968+
);
969+
970+
$this->assertEquals(
971+
"{\n \"a\": \"\\\\\"\n}",
972+
Json\Json::prettyPrint(Json\Json::encode(['a' => '\\']))
973+
);
974+
}
975+
963976
public function testPrettyPrintEmptyArray()
964977
{
965978
$original = <<<JSON
@@ -1058,19 +1071,6 @@ public function testJsonPretty()
10581071
$this->assertSame($original, Json\Json::prettyPrint($original));
10591072
}
10601073

1061-
public function testPrettyPrintDoublequoteFollowingEscapedBackslashShouldNotBeTreatedAsEscaped()
1062-
{
1063-
$this->assertEquals(
1064-
"[\n 1,\n \"\\\\\",\n 3\n]",
1065-
Json\Json::prettyPrint(Json\Json::encode([1, '\\', 3]))
1066-
);
1067-
1068-
$this->assertEquals(
1069-
"{\n \"a\": \"\\\\\"\n}",
1070-
Json\Json::prettyPrint(Json\Json::encode(['a' => '\\']))
1071-
);
1072-
}
1073-
10741074
public function testPrettyPrintRePrettyPrint()
10751075
{
10761076
$expected = <<<EOB

0 commit comments

Comments
 (0)