diff --git a/test/Unit/JsonPointerTest.php b/test/Unit/JsonPointerTest.php index 204f5224..07de4412 100644 --- a/test/Unit/JsonPointerTest.php +++ b/test/Unit/JsonPointerTest.php @@ -79,22 +79,33 @@ public function testFromJsonStringReturnsJsonPointer(string $value): void public function provideValidJsonStringValue(): \Generator { $values = [ + 'array-index-0' => '/0', + 'array-index-1' => '/1', + 'array-index-9000' => '/9000', 'document' => '', 'document-root' => '/', - 'property-points-to-array-element' => '/foo/0', - 'property-with-escaped-forward-slash' => '/a~1b', - 'property-with-escaped-tilde' => '/m~0n', - 'property-with-unescaped-back-slash' => '/i\\j', - 'property-with-unescaped-caret' => '/e^f', - 'property-with-unescaped-double-quote' => '/k"l', - 'property-with-unescaped-percent' => '/c%d', + 'property-caret' => '/^', + 'property-percent' => '/%', 'property-pipe' => '/|', - 'property-with-pipe' => '/foo|bar', - 'property-quote-single' => "/foo'bar", - 'property-quote-double' => '/foo"bar', + 'property-quote-double' => '/"', + 'property-quote-single' => "/'", + 'property-slash-backward' => '/\\', + 'property-slash-forward-escaped' => '/~1', 'property-space' => '/ ', - 'property-text' => '/foo', + 'property-tilde-escaped' => '/~0', 'property-unicode-character' => '/😆', + 'property-with-array-index' => '/foo/0', + 'property-with-caret' => '/foo^bar', + 'property-with-percent' => '/foo%bar', + 'property-with-pipe' => '/foo|bar', + 'property-with-quote-double' => '/foo"bar', + 'property-with-quote-single' => "/foo'bar", + 'property-with-slash-backward' => '/foo\\bar', + 'property-with-slash-forward-escaped' => '/foo~1bar', + 'property-with-tilde-escaped' => '/foo~0bar', + 'property-with-unicode-character' => '/foo😆bar', + 'property-with-word' => '/foo/bar', + 'property-word' => '/foo', ]; foreach ($values as $key => $value) { diff --git a/test/Unit/ReferenceTokenTest.php b/test/Unit/ReferenceTokenTest.php index 6ca4e4e3..f0fbb45c 100644 --- a/test/Unit/ReferenceTokenTest.php +++ b/test/Unit/ReferenceTokenTest.php @@ -92,99 +92,99 @@ public function testFromStringReturnsReferenceToken( public function provideValueAndJsonStringValue(): \Generator { $values = [ - 'integerish-9000' => [ - '9000', - '9000', - ], - 'integerish-zero' => [ + 'array-index-0' => [ '0', '0', ], - 'string-back-slash' => [ - '\\', - '\\', + 'array-index-1' => [ + '1', + '1', + ], + 'array-index-9000' => [ + '9000', + '9000', ], - 'string-caret' => [ + 'caret' => [ '^', '^', ], - 'string-percent' => [ + 'percent' => [ '%', '%', ], - 'string-pipe' => [ + 'pipe' => [ '|', '|', ], - 'string-quote-double' => [ + 'quote-double' => [ '"', '"', ], - 'string-quote-single' => [ + 'quote-single' => [ "'", "'", ], - 'string-slash-backward' => [ + 'slash-backwards' => [ '\\', '\\', ], - 'string-slash-forward' => [ + 'slash-forward' => [ '/', '~1', ], - 'string-space' => [ + 'space' => [ ' ', ' ', ], - 'string-word' => [ + 'word' => [ 'foo', 'foo', ], - 'string-tilde' => [ + 'tilde' => [ '~', '~0', ], - 'string-unicode-character' => [ + 'unicode-character' => [ '😆', '😆', ], - 'string-with-caret' => [ + 'with-caret' => [ 'foo^bar', 'foo^bar', ], - 'string-with-percent' => [ + 'with-percent' => [ 'foo%bar', 'foo%bar', ], - 'string-with-pipe' => [ + 'with-pipe' => [ 'foo|bar', 'foo|bar', ], - 'string-with-quote-double' => [ + 'with-quote-double' => [ 'foo"bar', 'foo"bar', ], - 'string-with-quote-single' => [ + 'with-quote-single' => [ "foo'bar", "foo'bar", ], - 'string-with-slash-backward' => [ + 'with-slash-backwards' => [ 'foo\\bar', 'foo\\bar', ], - 'string-with-slash-forward' => [ + 'with-slash-forwards' => [ 'foo/bar', 'foo~1bar', ], - 'string-with-space' => [ + 'with-space' => [ 'foo bar', 'foo bar', ], - 'string-with-tilde' => [ + 'with-tilde' => [ 'foo~bar', 'foo~0bar', ], - 'string-with-unicode-character' => [ + 'with-unicode-character' => [ 'foo😆bar', 'foo😆bar', ],