Skip to content

Commit 4b1f599

Browse files
[Docs] Add links to useful JSONPath resources
1 parent d1bfc5a commit 4b1f599

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

src/Codeception/Module/REST.php

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@
6060
* Content-Type: application/json
6161
* ```
6262
*
63+
* ## JSONPath
64+
*
65+
* [JSONPath](http://goessner.net/articles/JsonPath/) is the equivalent to XPath, for querying JSON data structures.
66+
* Here's an [Online JSONPath Expressions Tester](http://jsonpath.curiousconcept.com/)
67+
*
6368
* ## Public Properties
6469
*
6570
* * headers - array of headers going to be sent.
@@ -985,13 +990,8 @@ public function grabResponse()
985990
}
986991

987992
/**
988-
* Returns data from the current JSON response using [JSONPath](http://goessner.net/articles/JsonPath/) as selector.
989-
* JsonPath is XPath equivalent for querying Json structures.
990-
* Try your JsonPath expressions [online](http://jsonpath.curiousconcept.com/).
993+
* See [#jsonpath](#jsonpath) for general info on JSONPath.
991994
* Even for a single value an array is returned.
992-
*
993-
* This method **require [`flow/jsonpath` > 0.2](https://github.com/FlowCommunications/JSONPath/) library to be installed**.
994-
*
995995
* Example:
996996
*
997997
* ``` php
@@ -1081,12 +1081,8 @@ public function dontSeeResponseJsonMatchesXpath($xpath)
10811081
}
10821082

10831083
/**
1084-
* Checks if json structure in response matches [JsonPath](http://goessner.net/articles/JsonPath/).
1085-
* JsonPath is XPath equivalent for querying Json structures.
1086-
* Try your JsonPath expressions [online](http://jsonpath.curiousconcept.com/).
1087-
* This assertion allows you to check the structure of response json.
1088-
*
1089-
* This method **require [`flow/jsonpath` > 0.2](https://github.com/FlowCommunications/JSONPath/) library to be installed**.
1084+
* See [#jsonpath](#jsonpath) for general info on JSONPath.
1085+
* Checks if JSON structure in response matches JSONPath.
10901086
*
10911087
* ```json
10921088
* { "store": {
@@ -1135,7 +1131,8 @@ public function seeResponseJsonMatchesJsonPath($jsonPath)
11351131
}
11361132

11371133
/**
1138-
* Opposite to seeResponseJsonMatchesJsonPath
1134+
* See [#jsonpath](#jsonpath) for general info on JSONPath.
1135+
* Opposite to [`seeResponseJsonMatchesJsonPath()`](#seeResponseJsonMatchesJsonPath)
11391136
*
11401137
* @param string $jsonPath
11411138
* @part json

0 commit comments

Comments
 (0)