-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed
Labels
Description
Description
Currently the Symfony web function tests focus on traditional web pages, today many backend application/services only provide Restful APIs, the Request/Response should improve the JSON encoding and parsing.
Check JSON path doc: https://goessner.net/articles/JsonPath/
Example
$client->request(request =>
request->get("/posts/{id}", postId )
->accept(...)
->contentType(...)
->headers(headers => headers->put())
->jsonBody(...)
)$response->jsonPath("$.size()")
$response->jsonPath("$.foo.bar")
$response->jsonPath("$foo['bar']")