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()));
 }
Beispiel #2
0
 private function LimitToMonth(ReportCommandBuilder $builder)
 {
     $builder->Within($this->monthRange->Start(), $this->monthRange->End());
     return $builder;
 }
Beispiel #3
0
 /**
  * @return Date
  */
 public function RangeEnd()
 {
     return $this->range->End();
 }
 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);
 }