Co-authored-by: Sawjan Gurung <saw.jan.grg3e@gmail.com>
This commit is contained in:
co-authored by
Sawjan Gurung
parent
cc1f93eef1
commit
cbfd894243
@@ -1444,13 +1444,13 @@ class FeatureContext extends BehatVariablesContext {
|
||||
* @Then the JSON data of the response should match
|
||||
*
|
||||
* @param PyStringNode $schemaString
|
||||
* @param ResponseInterface|null $response
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function theDataOfTheResponseShouldMatch(PyStringNode $schemaString): void {
|
||||
$responseBody = $this->getJsonDecodedResponseBodyContent();
|
||||
public function theDataOfTheResponseShouldMatch(PyStringNode $schemaString, ResponseInterface $response=null): void {
|
||||
$responseBody = $this->getJsonDecodedResponseBodyContent($response);
|
||||
$this->assertJsonDocumentMatchesSchema(
|
||||
$responseBody,
|
||||
$this->getJSONSchema($schemaString)
|
||||
|
||||
Reference in New Issue
Block a user