File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -37,11 +37,13 @@ or in your `composer.json`:
37
37
38
38
## Asserts
39
39
40
- | Assert | Description |
41
- | ----------------------------- | ---------------------------------------------------------------------------- |
42
- | assertJsonMatchesSchema | Asserts that json content is valid according to the provided schema file |
43
- | assertJsonMatchesSchemaString | Asserts that json content is valid according to the provided schema string |
44
- | assertJsonValueEquals | Asserts if the value retrieved with the expression equals the expected value |
40
+ | Assert | Description | Available in |
41
+ | ----------------------------- | ---------------------------------------------------------------------------- | ------------ |
42
+ | assertJsonMatchesSchema | Asserts that json content is valid according to the provided schema file | All |
43
+ | assertJsonMatchesSchemaString | Asserts that json content is valid according to the provided schema string | All |
44
+ | assertJsonValueEquals | Asserts if the value retrieved with the expression equals the expected value | All |
45
+ | assertJsonValueEquals | Asserts if the value retrieved with the expression equals the expected value | All |
46
+ | assertJsonResponse | Asserts that a response is successful and of type json | Symfony |
45
47
46
48
## Usage
47
49
Original file line number Diff line number Diff line change @@ -39,4 +39,11 @@ public function testAssertJsonValueEquals()
39
39
40
40
Symfony::assertJsonValueEquals (123 , 'foo ' , $ response );
41
41
}
42
+
43
+ public function testAssertJsonResponse ()
44
+ {
45
+ $ response = new Response ('{} ' , 200 , ['Content-Type ' => 'application/json ' ]);
46
+
47
+ Symfony::assertJsonResponse ($ response );
48
+ }
42
49
}
You can’t perform that action at this time.
0 commit comments