Skip to content

Commit 6a217eb

Browse files
committed
Add tests and more details in README
1 parent 2b59aea commit 6a217eb

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff 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

tests/Extension/SymfonyTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)