public function getTableEntry($hour, $day)
 {
     if ($this->bookedTimes == NULL) {
         $room = new ilRoomSharingRoom($this->pool_id, $this->room_id);
         $this->bookedTimes = $room->getBookedTimes();
     }
     $result = NULL;
     $hourString = $hour['txt'];
     $hourStart = $this->getHourStart($hourString, $day);
     $hourEnd = $this->getHourEnd($hourString, $day);
     foreach ($this->bookedTimes as $appointment) {
         $beginOfAppointment = DateTime::createFromFormat($this->format, $appointment['date_from']);
         $endOfAppointment = DateTime::createFromFormat($this->format, $appointment['date_to']);
         if ($endOfAppointment <= $hourStart || $beginOfAppointment >= $hourEnd) {
         } else {
             $result = array('subject' => $appointment['subject'], 'begin' => $beginOfAppointment, 'end' => $endOfAppointment);
         }
     }
     return $result;
 }
 /**
  * @covers ilRoomSharingRoom::setBookedTimes
  */
 public function testSetBookedTimes()
 {
     $bookedTimes = array(array(1), array(2), array(3));
     self::$room->setBookedTimes($bookedTimes);
     $this->assertEquals($bookedTimes, self::$room->getBookedTimes());
 }