From e68452db633517f1a1b2c54f639d0a291996102e Mon Sep 17 00:00:00 2001 From: Filip Halaxa Date: Tue, 25 Jan 2022 21:56:28 +0100 Subject: [PATCH] Added test cases to testGetCurrentJsonPointer and testGetMatchedJsonPointer --- test/JsonMachineTest/ParserTest.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/JsonMachineTest/ParserTest.php b/test/JsonMachineTest/ParserTest.php index 29c10ca..36f502b 100644 --- a/test/JsonMachineTest/ParserTest.php +++ b/test/JsonMachineTest/ParserTest.php @@ -352,6 +352,11 @@ class ParserTest extends \PHPUnit_Framework_TestCase '{"one": [1,11], "two": [2,22], "three": [3,33], "four": [4,44]}', ['/two', '/two', '/four', '/four'], ], + [ + ['/-/two', '/-/one'], + '[{"one": 1, "two": 2}, {"one": 1, "two": 2}]', + ['/0/one', '/0/two', '/1/one', '/1/two'], + ], ]; } @@ -386,6 +391,11 @@ class ParserTest extends \PHPUnit_Framework_TestCase '{"one": [1,11], "two": [2,22], "three": [3,33], "four": [4,44]}', ['/two', '/two', '/four', '/four'], ], + [ + ['/-/two', '/-/one'], + '[{"one": 1, "two": 2}, {"one": 1, "two": 2}]', + ['/-/one', '/-/two', '/-/one', '/-/two'], + ], ]; }