| Total Complexity | 4 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class JsonSerializerTest extends SerializerTest |
||
| 9 | { |
||
| 10 | public function getSerializer(): SerializerInterface |
||
| 11 | { |
||
| 12 | return new JsonSerializer(); |
||
| 13 | } |
||
| 14 | |||
| 15 | public function serializeProvider(): array |
||
| 16 | { |
||
| 17 | return $this->dataProvider(); |
||
| 18 | } |
||
| 19 | |||
| 20 | public function unserializeProvider(): array |
||
| 21 | { |
||
| 22 | $data = $this->dataProvider(); |
||
| 23 | $data['object'] = [[], '{}',]; |
||
| 24 | |||
| 25 | return $data; |
||
| 26 | } |
||
| 27 | |||
| 28 | public function dataProvider(): array |
||
| 29 | { |
||
| 30 | return [ |
||
| 31 | 'int' => [1, '1',], |
||
| 32 | 'float' => [1.1, '1.1',], |
||
| 33 | 'string' => ['a', '"a"',], |
||
| 34 | 'null' => [null, 'null',], |
||
| 35 | 'bool' => [true, 'true',], |
||
| 36 | 'object' => [new \stdClass(), '{}',], |
||
| 37 | 'array' => [[], '[]',], |
||
| 38 | ]; |
||
| 41 |