mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-19 19:01:58 +00:00
106 lines
3.0 KiB
PHP
106 lines
3.0 KiB
PHP
<?php
|
|
/**
|
|
* ReportControllerTest.php
|
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
|
*
|
|
* This software may be modified and distributed under the terms of the
|
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
|
*
|
|
* See the LICENSE file for details.
|
|
*/
|
|
use FireflyIII\Generator\Report\Audit\MonthReportGenerator as AuditGenerator;
|
|
use FireflyIII\Generator\Report\ReportGeneratorInterface;
|
|
|
|
|
|
/**
|
|
* Generated by PHPUnit_SkeletonGenerator on 2016-12-10 at 05:51:43.
|
|
*/
|
|
class ReportControllerTest extends TestCase
|
|
{
|
|
|
|
|
|
/**
|
|
* Sets up the fixture, for example, opens a network connection.
|
|
* This method is called before a test is executed.
|
|
*/
|
|
public function setUp()
|
|
{
|
|
parent::setUp();
|
|
}
|
|
|
|
/**
|
|
* @covers \FireflyIII\Http\Controllers\ReportController::auditReport
|
|
*/
|
|
public function testAuditReport()
|
|
{
|
|
$this->be($this->user());
|
|
$this->call('get', route('reports.report.audit', [1, '20160101', '20160131']));
|
|
$this->assertResponseStatus(200);
|
|
$this->see('<ol class="breadcrumb">');
|
|
}
|
|
|
|
/**
|
|
* @covers \FireflyIII\Http\Controllers\ReportController::budgetReport
|
|
*/
|
|
public function testBudgetReport()
|
|
{
|
|
$this->be($this->user());
|
|
$this->call('get', route('reports.report.budget', [1, 1, '20160101', '20160131']));
|
|
$this->assertResponseStatus(200);
|
|
$this->see('<ol class="breadcrumb">');
|
|
}
|
|
|
|
/**
|
|
* @covers \FireflyIII\Http\Controllers\ReportController::categoryReport
|
|
*/
|
|
public function testCategoryReport()
|
|
{
|
|
$this->be($this->user());
|
|
$this->call('get', route('reports.report.category', [1, 1, '20160101', '20160131']));
|
|
$this->assertResponseStatus(200);
|
|
$this->see('<ol class="breadcrumb">');
|
|
}
|
|
|
|
/**
|
|
* @covers \FireflyIII\Http\Controllers\ReportController::defaultReport
|
|
*/
|
|
public function testDefaultReport()
|
|
{
|
|
$this->be($this->user());
|
|
$this->call('get', route('reports.report.default', [1, '20160101', '20160131']));
|
|
$this->assertResponseStatus(200);
|
|
$this->see('<ol class="breadcrumb">');
|
|
}
|
|
|
|
/**
|
|
* @covers \FireflyIII\Http\Controllers\ReportController::index
|
|
*/
|
|
public function testIndex()
|
|
{
|
|
$this->be($this->user());
|
|
$this->call('get', route('reports.index'));
|
|
$this->assertResponseStatus(200);
|
|
$this->see('<ol class="breadcrumb">');
|
|
}
|
|
|
|
/**
|
|
* @covers \FireflyIII\Http\Controllers\ReportController::options
|
|
*/
|
|
public function testOptions()
|
|
{
|
|
$this->be($this->user());
|
|
$this->call('get', route('reports.options', ['default']));
|
|
$this->assertResponseStatus(200);
|
|
}
|
|
|
|
/**
|
|
* @covers \FireflyIII\Http\Controllers\ReportController::postIndex
|
|
*/
|
|
public function testPostIndex()
|
|
{
|
|
$this->be($this->user());
|
|
$this->call('post', route('reports.index.post'));
|
|
$this->assertResponseStatus(302);
|
|
}
|
|
}
|