mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-22 03:53:37 +00:00
expand tests
This commit is contained in:
@@ -7,69 +7,67 @@
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
use FireflyIII\Helpers\Collection\Bill as BillCollection;
|
||||
use FireflyIII\Helpers\Collection\Category as CategoryCollection;
|
||||
use FireflyIII\Helpers\Collection\Expense;
|
||||
use FireflyIII\Helpers\Collection\Income;
|
||||
|
||||
/**
|
||||
* Generated by PHPUnit_SkeletonGenerator on 2016-01-19 at 15:39:28.
|
||||
*/
|
||||
class ReportControllerTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\ReportController::defaultMonth
|
||||
* @todo Implement testDefaultMonth().
|
||||
*/
|
||||
public function testDefaultMonth()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\ReportController::defaultMultiYear
|
||||
* @todo Implement testDefaultMultiYear().
|
||||
*/
|
||||
public function testDefaultMultiYear()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\ReportController::defaultYear
|
||||
* @todo Implement testDefaultYear().
|
||||
*/
|
||||
public function testDefaultYear()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\ReportController::index
|
||||
* @todo Implement testIndex().
|
||||
*/
|
||||
public function testIndex()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
$this->be($this->user());
|
||||
$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
|
||||
*/
|
||||
public function testReportDefaultMonth()
|
||||
{
|
||||
// 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->call('GET', '/reports/report/default/20160101/20160131/1,2');
|
||||
$this->assertResponseStatus(200);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\ReportController::report
|
||||
* @todo Implement testReport().
|
||||
* @covers FireflyIII\Http\Controllers\ReportController::defaultYear
|
||||
*/
|
||||
public function testReport()
|
||||
public function testReportDefaultYear()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
$this->be($this->user());
|
||||
$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
|
||||
*/
|
||||
public function testReportDefaultMultiYear()
|
||||
{
|
||||
$this->be($this->user());
|
||||
$this->call('GET', '/reports/report/default/20160101/20171231/1,2');
|
||||
$this->assertResponseStatus(200);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user