コード例 #1
0
 public function testDefaultsStartAndEnd()
 {
     $range = new Report_Range(Report_Range::DATE_RANGE, null, null, $this->timezone);
     $this->isTrue(Date::Min()->Equals($range->Start()));
     $this->isTrue(Date::Max()->Equals($range->End()));
 }
コード例 #2
0
ファイル: CannedReport.php プロジェクト: Trideon/gigolo
 private function LimitToMonth(ReportCommandBuilder $builder)
 {
     $builder->Within($this->monthRange->Start(), $this->monthRange->End());
     return $builder;
 }
コード例 #3
0
ファイル: SavedReport.php プロジェクト: JoseTfg/Booked
 /**
  * @return Date
  */
 public function RangeStart()
 {
     return $this->range->Start();
 }
コード例 #4
0
 public function testThisMonthsAccessories()
 {
     $report = new CannedReport(CannedReport::ACCESSORIES_THISMONTH, $this->fakeUser);
     $range = new Report_Range(Report_Range::CURRENT_MONTH, null, null, $this->fakeUser->Timezone);
     $builder = $report->GetBuilder();
     $expected = new ReportCommandBuilder();
     $expected->SelectFullList()->OfAccessories()->Within($range->Start(), $range->End());
     $this->assertEquals($expected, $builder);
 }