public function convertToPHPValue($value, \Doctrine\DBAL\Platforms\AbstractPlatform $platform) { if ($value === null) { return null; } $ret = explode(';', $value); array_walk($ret, function (&$unwashed) { $unwashed = trim($unwashed, '[]'); }); return $ret; }
/** * @test * @dataProvider provideSerializedValues */ public function valuesShouldDeserializeProperly($expected, $serialized) { $deserialized = $this->type->convertToPHPValue($serialized, $this->platform); $this->assertSame($expected, $deserialized); }