assertSame($array, $dbo->jsonSerialize()); } public function testNull() { $array = [ '2016-12-24 14:42:24', null, '2016-12-25 14:24:42' ]; $dbo = LuDateTimeDboArray::jsonDeserialize($array); $this->assertSame($array, $dbo->jsonSerialize()); } public function testInvalid() { $array = [ '2016-12-24 14:42:24', 'my date' ]; $this->expectException(LuDboDeserializeException::class); LuDateTimeDboArray::jsonDeserialize($array); } }