public function testSavesReport() { $this->SetupPage(); $reportName = 'report name'; $this->page->_ReportName = $reportName; $expectedStart = $this->page->_RangeStart; $expectedEnd = $this->page->_RangeEnd; $usage = new Report_Usage($this->page->_Usage); $selection = new Report_ResultSelection($this->page->_ResultSelection); $groupBy = new Report_GroupBy($this->page->_GroupBy); $range = new Report_Range($this->page->_Range, $expectedStart, $expectedEnd, $this->fakeUser->Timezone); $filter = new Report_Filter($this->page->_ResourceId, $this->page->_ScheduleId, $this->page->_UserId, $this->page->_GroupId, $this->page->_AccessoryId, $this->page->_ParticipantId); $this->reportingService->expects($this->once())->method('Save')->with($this->equalTo($reportName), $this->equalTo($this->fakeUser->UserId), $this->equalTo($usage), $this->equalTo($selection), $this->equalTo($groupBy), $this->equalTo($range), $this->equalTo($filter)); $this->presenter->SaveReport(); }
/** * @return void */ public function ProcessPageLoad() { $this->presenter->PageLoad(); $this->Display('Reports/generate-report.tpl'); }