mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-03 12:47:17 -06:00
44 lines
1.5 KiB
PHP
44 lines
1.5 KiB
PHP
<?php
|
|
/**
|
|
* ChartReportControllerTest.php
|
|
* Copyright (C) 2016 Sander Dorigo
|
|
*
|
|
* This software may be modified and distributed under the terms
|
|
* of the MIT license. See the LICENSE file for details.
|
|
*/
|
|
|
|
/**
|
|
* Generated by PHPUnit_SkeletonGenerator on 2016-01-19 at 15:39:57.
|
|
*/
|
|
class ChartReportControllerTest extends TestCase
|
|
{
|
|
/**
|
|
* @covers FireflyIII\Http\Controllers\Chart\ReportController::yearInOut
|
|
* @covers FireflyIII\Http\Controllers\Chart\ReportController::__construct
|
|
*/
|
|
public function testYearInOut()
|
|
{
|
|
$repository = $this->mock('FireflyIII\Helpers\Report\ReportQueryInterface');
|
|
$repository->shouldReceive('spentPerMonth')->once()->andReturn([]);
|
|
$repository->shouldReceive('earnedPerMonth')->once()->andReturn([]);
|
|
|
|
$this->be($this->user());
|
|
$this->call('GET', '/chart/report/in-out/default/20150101/20151231/1');
|
|
$this->assertResponseStatus(200);
|
|
}
|
|
|
|
/**
|
|
* @covers FireflyIII\Http\Controllers\Chart\ReportController::yearInOutSummarized
|
|
*/
|
|
public function testYearInOutSummarized()
|
|
{
|
|
$repository = $this->mock('FireflyIII\Helpers\Report\ReportQueryInterface');
|
|
$repository->shouldReceive('spentPerMonth')->once()->andReturn([]);
|
|
$repository->shouldReceive('earnedPerMonth')->once()->andReturn([]);
|
|
|
|
$this->be($this->user());
|
|
$this->call('GET', '/chart/report/in-out-sum/default/20150101/20151231/1');
|
|
$this->assertResponseStatus(200);
|
|
}
|
|
}
|