|
4 | 4 |
|
5 | 5 | use PHPUnit\Framework\Attributes\Test; |
6 | 6 | use PHPUnit\Framework\Attributes\TestWith; |
7 | | -use PHPUnit\Framework\Attributes\TestWithJson; |
8 | 7 | use PHPUnit\Framework\ExpectationFailedException; |
9 | 8 | use PHPUnit\Framework\TestCase; |
10 | 9 | use Spatie\Snapshots\Drivers\JsonDriver; |
@@ -126,16 +125,16 @@ public function it_can_not_serialize_resources() |
126 | 125 | } |
127 | 126 |
|
128 | 127 | #[Test] |
129 | | - #[TestWith(["{}", "{}", true])] |
130 | | - #[TestWith(["{}", "{\"data\":1}", false])] |
131 | | - #[TestWith(["{\"data\":1}", "{\"data\":1}", true])] |
132 | | - #[TestWith(["{\"data\":1}", "{\"data\":\"1\"}", false])] |
133 | | - #[TestWith(["true", "true", true])] |
134 | | - #[TestWith(["false", "false", true])] |
135 | | - #[TestWith(["null", "null", true])] |
136 | | - #[TestWith(["1", "1", true])] |
137 | | - #[TestWith(["1.1", "1.1", true])] |
138 | | - #[TestWith(["{\"empty\": []}", "{\"empty\":{}}", false])] |
| 128 | + #[TestWith(['{}', '{}', true])] |
| 129 | + #[TestWith(['{}', '{"data":1}', false])] |
| 130 | + #[TestWith(['{"data":1}', '{"data":1}', true])] |
| 131 | + #[TestWith(['{"data":1}', '{"data":"1"}', false])] |
| 132 | + #[TestWith(['true', 'true', true])] |
| 133 | + #[TestWith(['false', 'false', true])] |
| 134 | + #[TestWith(['null', 'null', true])] |
| 135 | + #[TestWith(['1', '1', true])] |
| 136 | + #[TestWith(['1.1', '1.1', true])] |
| 137 | + #[TestWith(['{"empty": []}', '{"empty":{}}', false])] |
139 | 138 | public function it_can_match_json_strings(string $expected, string $actual, bool $assertion) |
140 | 139 | { |
141 | 140 | $driver = new JsonDriver(); |
|
0 commit comments