예제 #1
0
 public function all($orgId)
 {
     $organization = $this->orgRepo->organizationOfId($orgId);
     if (!$organization) {
         throw new OrganizationNotFoundException($orgId);
     }
     return $this->calendarRepo->all($organization);
 }
 /**
  * @test
  * @group calendarrepo
  */
 public function should_return_event_of_id()
 {
     $klimtoren = $this->getKlimtoren();
     $events = $this->calendarRepo->all($klimtoren);
     $tmp = $events[0];
     $id = $tmp->id();
     $this->em->clear();
     $event = $this->calendarRepo->eventOfId($id);
     $this->assertInstanceOf('Bakgat\\Notos\\Domain\\Model\\Event\\CalendarEvent', $event);
     $this->assertEquals($id, $event->id());
 }