Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 2 |
1 | <?php |
||
14 | public function test_serialize() |
||
15 | { |
||
16 | $definition = new Definition(); |
||
|
|||
17 | $definition->setField('status'); |
||
18 | $definition->setPlaces(['pending', 'published']); |
||
19 | $data = serialize($definition); |
||
20 | |||
21 | self::assertSame( |
||
22 | 'C:62:"ByTIC\Models\SmartProperties\Properties\Definitions\Definition":115:{a:4:{s:4:"name";N;s:5:"field";s:6:"status";s:5:"label";N;s:6:"places";a:2:{i:0;s:7:"pending";i:1;s:9:"published";}}}', |
||
23 | $data |
||
24 | ); |
||
25 | $definition2 = unserialize($data); |
||
26 | self::assertEquals($definition, $definition2); |
||
27 | } |
||
30 |