Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions src/Codeception/Module/REST.php
Original file line numberDiff line numberDiff line change
Expand Up@@ -53,6 +53,11 @@
* headers:
* Content-Type: application/json
*
* ## JSONPath
*
* [JSONPath](http://goessner.net/articles/JsonPath/) is the equivalent to XPath, for querying JSON data structures.
* Here's an [Online JSONPath Expressions Tester](http://jsonpath.curiousconcept.com/)
*
* ## Public Properties
*
* * headers - array of headers going to be sent.
Expand DownExpand Up@@ -958,13 +963,8 @@ public function grabResponse()
}

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

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

/**
* Opposite to seeResponseJsonMatchesJsonPath
* See [#jsonpath](#jsonpath) for general info on JSONPath.
* Opposite to [`seeResponseJsonMatchesJsonPath()`](#seeResponseJsonMatchesJsonPath)
*
* @param string $jsonPath
* @part json
Expand Down