/** * Return the Admins of the Group * * @return ArrayCollection */ public function admins() { return $this->admins->map(function ($user) { return $this->userInGroupTranslator->adminFrom($user); }); }
/** @test */ public function should_create_admin_from_user() { $admin = $this->translator->adminFrom($this->user); $this->assertInstanceOf('Cribbb\\Domain\\Model\\Groups\\Admin', $admin); }