public function addGroup(TestGroup $group) { $group->setUser($this); $this->groups->add($group); return $this; }