Exemplo n.º 1
0
 public function testNonExistentTestDataDoesntBreak()
 {
     $event = new EventEntity(new stdClass());
     $event->getName();
     $event->getIcon();
     $event->getStartDate();
     $event->getEndDate();
     $event->getLocation();
     $event->getDescription();
     $event->getTags();
     $event->getLatitude();
     $event->getLongitude();
     $event->getWebsiteAddress();
     $event->getAttendeeCount();
     $event->getCommentsCount();
     $event->getCommentsUri();
     $event->getApiUriToMarkAsAttending();
     $event->getTalksUri();
     $event->getUri();
     $event->getVerboseUri();
     $event->isAttending();
     $event->getUrlFriendlyName();
     $event->getStub();
     $event->getAllTalkCommentsUri();
     $this->assertEquals(false, $event->areCommentsEnabled());
 }
Exemplo n.º 2
0
 /**
  * @param array       $slugs
  * @param EventEntity $event
  */
 private function getTalkSlugsFromApi(EventEntity $event)
 {
     $talkApi = $this->getTalkApi();
     // Fetch talks from the API
     $talks = $talkApi->getCollection($event->getTalksUri(), array('resultsperpage' => 100));
     /** @var \Talk\TalkEntity $talk */
     foreach ($talks['talks'] as $talk) {
         $slugs[$talk->getApiUri()] = $talk->getUrlFriendlyTalkTitle();
     }
     return $slugs;
 }
Exemplo n.º 3
0
 /**
  * Builds schedule data into an array structure
  * for schedule view
  *
  * @param EventEntity $event
  * @return array
  */
 public function getScheduleData(EventEntity $event)
 {
     $talks = $this->getTalks($event->getTalksUri() . '?start=0&resultsperpage=1000');
     $eventDays = $this->getEventDays($talks);
     return $eventDays;
 }