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