[tests-only] use new json schema assertion lib that supports latest schema drafts (#8503)

* test(api): use new json schema assertion lib that supports latest schema drafts

* test(api): fix json schema

* test(api): fix method call

* test(api): update expected failure lines

* test(api): add custom schema validator

* test(api): add custom schema validator

* test(api): add custom schema validator

* test(api): add custom schema validator

* test(api): make json array validation strict

* test(api): fix php code style

* test(api): update expected failure lines
This commit is contained in:
Sawjan Gurung
2024-02-23 16:24:22 +05:45
committed by GitHub
parent ee501f225e
commit 3cea035d6d
17 changed files with 2563 additions and 2312 deletions
@@ -206,7 +206,11 @@ class GraphContext implements Context {
*/
public function theUserInformationShouldMatchTheJSON(string $user, PyStringNode $schemaString): void {
$response = $this->adminHasRetrievedUserUsingTheGraphApi($user);
$this->featureContext->theDataOfTheResponseShouldMatch($schemaString, $response);
$responseBody = $this->featureContext->getJsonDecodedResponseBodyContent($response);
$this->featureContext->assertJsonDocumentMatchesSchema(
$responseBody,
$this->featureContext->getJSONSchema($schemaString)
);
}
/**