2016-11-19 20:30:30 +01:00
|
|
|
<?php
|
2016-12-06 09:16:36 +01:00
|
|
|
/**
|
|
|
|
* AccountControllerTest.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-07 19:53:41 +01:00
|
|
|
* Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:33.
|
2016-11-19 20:30:30 +01:00
|
|
|
*/
|
|
|
|
class AccountControllerTest 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\AccountController::expenseAccounts
|
2016-11-26 08:55:26 +01:00
|
|
|
* Implement testExpenseAccounts().
|
2016-11-19 20:30:30 +01:00
|
|
|
*/
|
|
|
|
public function testExpenseAccounts()
|
|
|
|
{
|
2016-12-09 18:53:13 +01:00
|
|
|
$this->be($this->user());
|
|
|
|
$this->call('get', route('chart.account.expense'));
|
|
|
|
$this->assertResponseStatus(200);
|
2016-11-19 20:30:30 +01:00
|
|
|
}
|
|
|
|
|
2016-11-20 18:34:49 +01:00
|
|
|
/**
|
2016-12-07 19:53:41 +01:00
|
|
|
* @covers \FireflyIII\Http\Controllers\Chart\AccountController::expenseBudget
|
2016-12-06 09:16:36 +01:00
|
|
|
* Implement testExpenseBudget().
|
2016-11-20 18:34:49 +01:00
|
|
|
*/
|
2016-12-06 09:16:36 +01:00
|
|
|
public function testExpenseBudget()
|
2016-11-20 18:34:49 +01:00
|
|
|
{
|
2016-12-09 18:53:13 +01:00
|
|
|
$this->be($this->user());
|
|
|
|
$this->call('get', route('chart.account.expense-budget', [1, '20120101', '20120131']));
|
|
|
|
$this->assertResponseStatus(200);
|
2016-11-20 18:34:49 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2016-12-07 19:53:41 +01:00
|
|
|
* @covers \FireflyIII\Http\Controllers\Chart\AccountController::expenseCategory
|
2016-12-06 09:16:36 +01:00
|
|
|
* Implement testExpenseCategory().
|
2016-11-20 18:34:49 +01:00
|
|
|
*/
|
2016-12-06 09:16:36 +01:00
|
|
|
public function testExpenseCategory()
|
2016-11-20 18:34:49 +01:00
|
|
|
{
|
2016-12-09 18:53:13 +01:00
|
|
|
$this->be($this->user());
|
|
|
|
$this->call('get', route('chart.account.expense-category', [1, '20120101', '20120131']));
|
|
|
|
$this->assertResponseStatus(200);
|
2016-11-20 18:34:49 +01:00
|
|
|
}
|
|
|
|
|
2016-11-19 20:30:30 +01:00
|
|
|
/**
|
2016-12-07 19:53:41 +01:00
|
|
|
* @covers \FireflyIII\Http\Controllers\Chart\AccountController::frontpage
|
2016-11-26 08:55:26 +01:00
|
|
|
* Implement testFrontpage().
|
2016-11-19 20:30:30 +01:00
|
|
|
*/
|
|
|
|
public function testFrontpage()
|
|
|
|
{
|
2016-12-09 18:53:13 +01:00
|
|
|
$this->be($this->user());
|
|
|
|
$this->call('get', route('chart.account.frontpage'));
|
|
|
|
$this->assertResponseStatus(200);
|
2016-11-19 20:30:30 +01:00
|
|
|
}
|
|
|
|
|
2016-11-20 18:34:49 +01:00
|
|
|
/**
|
2016-12-07 19:53:41 +01:00
|
|
|
* @covers \FireflyIII\Http\Controllers\Chart\AccountController::incomeCategory
|
2016-12-06 09:16:36 +01:00
|
|
|
* Implement testIncomeCategory().
|
2016-11-20 18:34:49 +01:00
|
|
|
*/
|
2016-12-06 09:16:36 +01:00
|
|
|
public function testIncomeCategory()
|
2016-11-20 18:34:49 +01:00
|
|
|
{
|
2016-12-09 18:53:13 +01:00
|
|
|
$this->be($this->user());
|
|
|
|
$this->call('get', route('chart.account.income-category', [1, '20120101', '20120131']));
|
|
|
|
$this->assertResponseStatus(200);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @covers \FireflyIII\Http\Controllers\Chart\AccountController::period
|
|
|
|
* Implement testSpecificPeriod().
|
|
|
|
*/
|
|
|
|
public function testPeriod()
|
|
|
|
{
|
|
|
|
$this->be($this->user());
|
|
|
|
$this->call('get', route('chart.account.period', [1, '2012-01-01']));
|
|
|
|
$this->assertResponseStatus(200);
|
2016-11-20 18:34:49 +01:00
|
|
|
}
|
|
|
|
|
2016-11-19 20:30:30 +01:00
|
|
|
/**
|
2016-12-07 19:53:41 +01:00
|
|
|
* @covers \FireflyIII\Http\Controllers\Chart\AccountController::report
|
2016-11-26 08:55:26 +01:00
|
|
|
* Implement testReport().
|
2016-11-19 20:30:30 +01:00
|
|
|
*/
|
|
|
|
public function testReport()
|
|
|
|
{
|
2016-12-09 18:53:13 +01:00
|
|
|
$this->be($this->user());
|
|
|
|
$this->call('get', route('chart.account.report', ['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\AccountController::revenueAccounts
|
2016-11-26 08:55:26 +01:00
|
|
|
* Implement testRevenueAccounts().
|
2016-11-19 20:30:30 +01:00
|
|
|
*/
|
|
|
|
public function testRevenueAccounts()
|
|
|
|
{
|
2016-12-09 18:53:13 +01:00
|
|
|
$this->be($this->user());
|
|
|
|
$this->call('get', route('chart.account.revenue'));
|
|
|
|
$this->assertResponseStatus(200);
|
2016-11-19 20:30:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2016-12-07 19:53:41 +01:00
|
|
|
* @covers \FireflyIII\Http\Controllers\Chart\AccountController::single
|
2016-11-26 08:55:26 +01:00
|
|
|
* Implement testSingle().
|
2016-11-19 20:30:30 +01:00
|
|
|
*/
|
|
|
|
public function testSingle()
|
|
|
|
{
|
2016-12-09 18:53:13 +01:00
|
|
|
$this->be($this->user());
|
|
|
|
$this->call('get', route('chart.account.single', [1]));
|
|
|
|
$this->assertResponseStatus(200);
|
2016-11-19 20:30:30 +01:00
|
|
|
}
|
2016-11-20 11:43:19 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Tears down the fixture, for example, closes a network connection.
|
|
|
|
* This method is called after a test is executed.
|
|
|
|
*/
|
|
|
|
protected function tearDown()
|
|
|
|
{
|
|
|
|
}
|
2016-11-19 20:30:30 +01:00
|
|
|
}
|