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() implements SerializableInterface { public $value = ''; public function serialize() : string { 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; } }