firefly-iii/tests/acceptance/Controllers/Chart/ChartReportControllerTest.php

44 lines
1.5 KiB
PHP
Raw Normal View History

2016-01-19 23:20:09 -06:00
<?php
/**
* ChartReportControllerTest.php
2016-04-01 09:46:11 -05:00
* Copyright (C) 2016 thegrumpydictator@gmail.com
2016-01-19 23:20:09 -06:00
*
* 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
2016-02-04 00:30:48 -06:00
* @covers FireflyIII\Http\Controllers\Chart\ReportController::__construct
2016-01-19 23:20:09 -06:00
*/
public function testYearInOut()
{
2016-01-23 01:48:36 -06:00
$repository = $this->mock('FireflyIII\Helpers\Report\ReportQueryInterface');
$repository->shouldReceive('spentPerMonth')->once()->andReturn([]);
$repository->shouldReceive('earnedPerMonth')->once()->andReturn([]);
$this->be($this->user());
2016-01-24 11:11:57 -06:00
$this->call('GET', '/chart/report/in-out/default/20150101/20151231/1');
$this->assertResponseStatus(200);
2016-01-19 23:20:09 -06:00
}
/**
* @covers FireflyIII\Http\Controllers\Chart\ReportController::yearInOutSummarized
*/
public function testYearInOutSummarized()
{
2016-01-23 01:48:36 -06:00
$repository = $this->mock('FireflyIII\Helpers\Report\ReportQueryInterface');
$repository->shouldReceive('spentPerMonth')->once()->andReturn([]);
$repository->shouldReceive('earnedPerMonth')->once()->andReturn([]);
$this->be($this->user());
2016-01-24 11:11:57 -06:00
$this->call('GET', '/chart/report/in-out-sum/default/20150101/20151231/1');
$this->assertResponseStatus(200);
2016-01-19 23:20:09 -06:00
}
}