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`:
3737
3838## Asserts
3939
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 |
4547
4648## Usage
4749
Original file line number Diff line number Diff line change @@ -39,4 +39,11 @@ public function testAssertJsonValueEquals()
3939
4040 Symfony::assertJsonValueEquals (123 , 'foo ' , $ response );
4141 }
42+
43+ public function testAssertJsonResponse ()
44+ {
45+ $ response = new Response ('{} ' , 200 , ['Content-Type ' => 'application/json ' ]);
46+
47+ Symfony::assertJsonResponse ($ response );
48+ }
4249}
You can’t perform that action at this time.
0 commit comments