예제 #1
0
 public function testGetFormattedTimeRange()
 {
     $p = new Period(0, '13:00', '17:00');
     $this->assertEquals('13:00 - 17:00', $p->getFormattedTimeRange());
     $this->assertEquals('0013 - 0017', $p->getFormattedTimeRange('iH'));
 }
예제 #2
0
 /** Adds dummy periods to the set */
 public function addDummyPeriods()
 {
     for ($i = 0; $i < 7; $i++) {
         if (count($this->getPeriodsByDay($i)) < 1) {
             $newPeriod = Period::createDummy($i);
             $this->periods->append($newPeriod);
         }
     }
 }