public function testSliceStatsReport() { $stats_report = StatsGen::genStatsReportDateRange(new DateTime('2013-10-01'), new DateTime('2013-10-30')); $sliced = $this->reports->sliceStatsReport($stats_report, new DateTime('2013-10-10'), new DateTime('2013-10-20')); $this->assertCount(11, $sliced->stats); $this->assertEquals('2013-10-10', $sliced->stats[0]->time_start->format('Y-m-d')); $this->assertEquals('2013-10-20', $sliced->stats[10]->time_start->format('Y-m-d')); }