/** * @test */ public function when_deserializing_do_not_call_the_callable_when_the_value_is_null() { $serializedData = ['foo' => null]; $callables = ['foo' => function (array $data) { // when passing null, this would cause a fatal error }]; $this->assertSame($serializedData, RecursiveSerializer::deserialize($serializedData, $callables)); }
/** * @see \Broadway\Serializer\SerializableInterface::serialize() * * @return array Values of properties that should be serialized */ public final function serialize() { return RecursiveSerializer::serialize(get_object_vars($this)); }