Ejemplo n.º 1
0
 /**
  * @param $kind_name
  * @param integer|null $orgId
  * @return ArrayCollection
  * @throws OrganizationNotFoundException
  */
 public function groupsOfKind($kind_name, $orgId = null)
 {
     $level = $this->kindRepo->get($kind_name);
     if ($orgId) {
         $organization = $this->orgRepo->organizationOfId($orgId);
         if (!$organization) {
             throw new OrganizationNotFoundException($orgId);
         }
     }
     return $this->groupRepo->groupsOfKind($level, $orgId);
 }
 /**
  * @test
  * @group grouprepo
  */
 public function should_return_empty_when_no_groups_of_kind_are_found()
 {
     $foo = new Kind('foo');
     $groups = $this->groupRepo->groupsOfKind($foo);
     $this->assertEmpty($groups);
 }