public function Add(ReportCommandBuilder $builder)
 {
     if ($this->selection == self::FULL_LIST) {
         $builder->SelectFullList();
     }
     if ($this->selection == self::COUNT) {
         $builder->SelectCount();
     }
     if ($this->selection == self::TIME) {
         $builder->SelectTime();
     }
 }
Example #2
0
 private function UserTimeAllTime()
 {
     $builder = new ReportCommandBuilder();
     $builder->SelectTime()->OfResources()->GroupByUser()->LimitedTo(self::LIMIT);
     return $builder;
 }
Example #3
0
 public function testGetsTopUsersByTimeReservedThisMonth()
 {
     $report = new CannedReport(CannedReport::USER_TIME_THISMONTH, $this->fakeUser);
     $range = new Report_Range(Report_Range::CURRENT_MONTH, null, null, $this->fakeUser->Timezone);
     $builder = $report->GetBuilder();
     $expected = new ReportCommandBuilder();
     $expected->SelectTime()->OfResources()->GroupByUser()->Within($range->Start(), $range->End())->LimitedTo(20);
     $this->assertEquals($expected, $builder);
 }