datetime = new \DateTime('2005-10-11'); $this->hasManyDirect = [ new ManyToManyDirectModel(), new ManyToManyDirectModel(), ]; $this->hasManyRelations = [ new ManyToManyRelModel(), new ManyToManyRelModel(), ]; $this->ownsOneSelf = new OwnsOneModel(); $this->belongsToOne = new BelongsToModel(); $this->serializable = new class() { public $value = ''; public function __serialize() { return ['123']; } public function __unserialize($data) : void { $this->value = $data; } }; $this->jsonSerializable = new class() implements \JsonSerializable { public function jsonSerialize() { return [1, 2, 3]; } }; } public function getId() : int { return $this->id; } }