| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public function testNew() : void |
||
| 16 | { |
||
| 17 | $value = NAN; |
||
| 18 | $encoded = json_encode($value); |
||
|
|
|||
| 19 | |||
| 20 | $exception = SerializationFailed::new($value, 'json', json_last_error_msg()); |
||
| 21 | |||
| 22 | self::assertSame( |
||
| 23 | 'Could not convert PHP type "double" to "json". An error was triggered by the serialization: Inf and NaN cannot be JSON encoded', |
||
| 24 | $exception->getMessage() |
||
| 25 | ); |
||
| 28 |