コード例 #1
0
 /**
  * Method that checks if the min allocation of a room is not reached.
  */
 private function isRoomUnderbooked()
 {
     $room = new ilRoomSharingRoom($this->pool_id, $this->room_id);
     $min_alloc = $room->getMinAlloc();
     $filtered_participants = array_filter($this->participants, array($this, "filterValidParticipants"));
     $underbooked = count($filtered_participants) + 1 < $min_alloc;
     return $underbooked;
 }
コード例 #2
0
 /**
  * @covers ilRoomSharingRoom::setMinAlloc
  */
 public function testSetMinAlloc()
 {
     self::$room->setMinAlloc(100);
     $this->assertEquals(100, self::$room->getMinAlloc());
 }