2016-11-19 20:30:30 +01:00
|
|
|
<?php
|
2016-12-06 09:16:36 +01:00
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2016-11-19 20:30:30 +01:00
|
|
|
namespace Chart;
|
2016-11-20 11:43:19 +01:00
|
|
|
|
2016-11-19 20:30:30 +01:00
|
|
|
use TestCase;
|
|
|
|
|
|
|
|
/**
|
2016-12-10 06:54:50 +01:00
|
|
|
* Generated by PHPUnit_SkeletonGenerator on 2016-12-10 at 05:51:41.
|
2016-11-19 20:30:30 +01:00
|
|
|
*/
|
|
|
|
class ReportControllerTest extends TestCase
|
|
|
|
{
|
2016-11-20 07:24:18 +01:00
|
|
|
|
2016-11-19 20:30:30 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets up the fixture, for example, opens a network connection.
|
|
|
|
* This method is called before a test is executed.
|
|
|
|
*/
|
|
|
|
public function setUp()
|
|
|
|
{
|
2016-11-20 08:30:25 +01:00
|
|
|
parent::setUp();
|
2016-11-19 20:30:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2016-12-07 19:53:41 +01:00
|
|
|
* @covers \FireflyIII\Http\Controllers\Chart\ReportController::netWorth
|
2016-11-19 20:30:30 +01:00
|
|
|
*/
|
|
|
|
public function testNetWorth()
|
|
|
|
{
|
2016-12-10 07:29:36 +01:00
|
|
|
$this->be($this->user());
|
|
|
|
$this->call('get', route('chart.report.net-worth', [1, '20120101', '20120131']));
|
|
|
|
$this->assertResponseStatus(200);
|
2016-11-19 20:30:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2016-12-07 19:53:41 +01:00
|
|
|
* @covers \FireflyIII\Http\Controllers\Chart\ReportController::operations
|
2016-11-19 20:30:30 +01:00
|
|
|
*/
|
2016-12-06 09:16:36 +01:00
|
|
|
public function testOperations()
|
2016-11-19 20:30:30 +01:00
|
|
|
{
|
2016-12-10 07:29:36 +01:00
|
|
|
$this->be($this->user());
|
|
|
|
$this->call('get', route('chart.report.operations', [1, '20120101', '20120131']));
|
|
|
|
$this->assertResponseStatus(200);
|
2016-11-19 20:30:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2016-12-07 19:53:41 +01:00
|
|
|
* @covers \FireflyIII\Http\Controllers\Chart\ReportController::sum
|
2016-11-19 20:30:30 +01:00
|
|
|
*/
|
2016-12-06 09:16:36 +01:00
|
|
|
public function testSum()
|
2016-11-19 20:30:30 +01:00
|
|
|
{
|
2016-12-10 07:29:36 +01:00
|
|
|
$this->be($this->user());
|
|
|
|
$this->call('get', route('chart.report.sum', [1, '20120101', '20120131']));
|
|
|
|
$this->assertResponseStatus(200);
|
2016-11-20 11:43:19 +01:00
|
|
|
}
|
2016-11-19 20:30:30 +01:00
|
|
|
}
|