be($this->user()); $this->changeDateRange($this->user(), $range); $this->call('GET', '/reports'); $this->assertResponseStatus(200); } /** * @covers FireflyIII\Http\Controllers\ReportController::__construct * @covers FireflyIII\Http\Controllers\ReportController::report * @covers FireflyIII\Http\Controllers\ReportController::defaultMonth * @dataProvider dateRangeProvider * * @param $range */ public function testReportDefaultMonth($range) { // mock some stuff. $repository = $this->mock('FireflyIII\Helpers\Report\ReportHelperInterface'); $repository->shouldReceive('getCategoryReport')->once()->andReturn(new CategoryCollection); $repository->shouldReceive('getIncomeReport')->once()->andReturn(new Income); $repository->shouldReceive('getExpenseReport')->once()->andReturn(new Expense); $repository->shouldReceive('getBillReport')->once()->andReturn(new BillCollection); $this->be($this->user()); $this->changeDateRange($this->user(), $range); $this->call('GET', '/reports/report/default/20160101/20160131/1,2'); $this->assertResponseStatus(200); } /** * @covers FireflyIII\Http\Controllers\ReportController::report * @covers FireflyIII\Http\Controllers\ReportController::defaultYear * @dataProvider dateRangeProvider * * @param $range */ public function testReportDefaultYear($range) { $this->be($this->user()); $this->changeDateRange($this->user(), $range); $this->call('GET', '/reports/report/default/20160101/20161231/1,2'); $this->assertResponseStatus(200); } /** * @covers FireflyIII\Http\Controllers\ReportController::report * @covers FireflyIII\Http\Controllers\ReportController::defaultMultiYear * @dataProvider dateRangeProvider * * @param $range */ public function testReportDefaultMultiYear($range) { $this->be($this->user()); $this->changeDateRange($this->user(), $range); $this->call('GET', '/reports/report/default/20160101/20171231/1,2'); $this->assertResponseStatus(200); } }