New tests

This commit is contained in:
James Cole
2016-12-10 07:29:36 +01:00
parent e7845115f6
commit 0fe0de1a7f
17 changed files with 141 additions and 282 deletions

View File

@@ -43,6 +43,7 @@ class Navigation
'1M' => 'addMonths', 'month' => 'addMonths', 'monthly' => 'addMonths', '3M' => 'addMonths', '1M' => 'addMonths', 'month' => 'addMonths', 'monthly' => 'addMonths', '3M' => 'addMonths',
'quarter' => 'addMonths', 'quarterly' => 'addMonths', '6M' => 'addMonths', 'half-year' => 'addMonths', 'quarter' => 'addMonths', 'quarterly' => 'addMonths', '6M' => 'addMonths', 'half-year' => 'addMonths',
'year' => 'addYears', 'yearly' => 'addYears', '1Y' => 'addYears', 'year' => 'addYears', 'yearly' => 'addYears', '1Y' => 'addYears',
'custom' => 'addMonths', // custom? just add one month.
]; ];
$modifierMap = [ $modifierMap = [
'quarter' => 3, 'quarter' => 3,

View File

@@ -255,10 +255,9 @@ Route::group(
Route::group( Route::group(
['middleware' => 'user-full-auth', 'namespace' => 'Chart', 'prefix' => 'chart/budget', 'as' => 'chart.budget.'], function () { ['middleware' => 'user-full-auth', 'namespace' => 'Chart', 'prefix' => 'chart/budget', 'as' => 'chart.budget.'], function () {
Route::get('frontpage', ['uses' => 'BudgetController@frontpage']); Route::get('frontpage', ['uses' => 'BudgetController@frontpage', 'as' => 'frontpage']);
Route::get('period/0/{accountList}/{start_date}/{end_date}', ['uses' => 'BudgetController@periodNoBudget', 'as' => 'period.no-budget']);
Route::get('period/0/{accountList}/{start_date}/{end_date}', ['uses' => 'BudgetController@periodNoBudget']); Route::get('period/{budget}/{accountList}/{start_date}/{end_date}', ['uses' => 'BudgetController@period', 'as' => 'period']);
Route::get('period/{budget}/{accountList}/{start_date}/{end_date}', ['uses' => 'BudgetController@period']);
Route::get('budget/{budget}/{limitrepetition}', ['uses' => 'BudgetController@budgetLimit', 'as' => 'budget-limit']); Route::get('budget/{budget}/{limitrepetition}', ['uses' => 'BudgetController@budgetLimit', 'as' => 'budget-limit']);
Route::get('budget/{budget}', ['uses' => 'BudgetController@budget', 'as' => 'budget']); Route::get('budget/{budget}', ['uses' => 'BudgetController@budget', 'as' => 'budget']);
@@ -272,12 +271,11 @@ Route::group(
['middleware' => 'user-full-auth', 'namespace' => 'Chart', 'prefix' => 'chart/category', 'as' => 'chart.category.'], function () { ['middleware' => 'user-full-auth', 'namespace' => 'Chart', 'prefix' => 'chart/category', 'as' => 'chart.category.'], function () {
Route::get('frontpage', ['uses' => 'CategoryController@frontpage']); Route::get('frontpage', ['uses' => 'CategoryController@frontpage']);
Route::get('period/{category}', ['uses' => 'CategoryController@currentPeriod', 'as' => 'current']); Route::get('period/{category}', ['uses' => 'CategoryController@currentPeriod', 'as' => 'current']);
Route::get('period/{category}/{date}', ['uses' => 'CategoryController@specificPeriod', 'as' => 'specific']); Route::get('period/{category}/{date}', ['uses' => 'CategoryController@specificPeriod', 'as' => 'specific']);
Route::get('all/{category}', ['uses' => 'CategoryController@all', 'as' => 'all']); Route::get('all/{category}', ['uses' => 'CategoryController@all', 'as' => 'all']);
Route::get('report-period/0/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@reportPeriodNoCategory']); Route::get('report-period/0/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@reportPeriodNoCategory', 'as' => 'period.no-category']);
Route::get('report-period/{category}/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@reportPeriod']); Route::get('report-period/{category}/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@reportPeriod', 'as' => 'period']);
// these charts are used in reports (category reports): // these charts are used in reports (category reports):
Route::get( Route::get(
@@ -297,8 +295,10 @@ Route::group(
['uses' => 'CategoryReportController@accountExpense', 'as' => 'account-expense'] ['uses' => 'CategoryReportController@accountExpense', 'as' => 'account-expense']
); );
Route::get('report-in-out/{accountList}/{categoryList}/{start_date}/{end_date}', Route::get(
['uses' => 'CategoryReportController@mainChart', 'as' => 'main']); 'report-in-out/{accountList}/{categoryList}/{start_date}/{end_date}',
['uses' => 'CategoryReportController@mainChart', 'as' => 'main']
);
} }
); );
@@ -307,8 +307,8 @@ Route::group(
* Chart\PiggyBank Controller * Chart\PiggyBank Controller
*/ */
Route::group( Route::group(
['middleware' => 'user-full-auth', 'namespace' => 'Chart', 'prefix' => 'chart/piggy-bank'], function () { ['middleware' => 'user-full-auth', 'namespace' => 'Chart', 'prefix' => 'chart/piggy-bank','as'=> 'chart.piggy-bank.'], function () {
Route::get('{piggyBank}', ['uses' => 'PiggyBankController@history']); Route::get('{piggyBank}', ['uses' => 'PiggyBankController@history','as' => 'history']);
} }
); );
@@ -317,7 +317,7 @@ Route::group(
*/ */
Route::group( Route::group(
['middleware' => 'user-full-auth', 'namespace' => 'Chart', 'prefix' => 'chart/report', 'as' => 'chart.report.'], function () { ['middleware' => 'user-full-auth', 'namespace' => 'Chart', 'prefix' => 'chart/report', 'as' => 'chart.report.'], function () {
Route::get('operations/{accountList}/{start_date}/{end_date}', ['uses' => 'ReportController@operations' ,'as' => 'operations']); Route::get('operations/{accountList}/{start_date}/{end_date}', ['uses' => 'ReportController@operations', 'as' => 'operations']);
Route::get('operations-sum/{accountList}/{start_date}/{end_date}/', ['uses' => 'ReportController@sum', 'as' => 'sum']); Route::get('operations-sum/{accountList}/{start_date}/{end_date}/', ['uses' => 'ReportController@sum', 'as' => 'sum']);
Route::get('net-worth/{accountList}/{start_date}/{end_date}/', ['uses' => 'ReportController@netWorth', 'as' => 'net-worth']); Route::get('net-worth/{accountList}/{start_date}/{end_date}/', ['uses' => 'ReportController@netWorth', 'as' => 'net-worth']);
@@ -371,7 +371,7 @@ Route::group(
Route::get('box/out', ['uses' => 'JsonController@boxOut', 'as' => 'box.out']); Route::get('box/out', ['uses' => 'JsonController@boxOut', 'as' => 'box.out']);
Route::get('box/bills-unpaid', ['uses' => 'JsonController@boxBillsUnpaid', 'as' => 'box.paid']); Route::get('box/bills-unpaid', ['uses' => 'JsonController@boxBillsUnpaid', 'as' => 'box.paid']);
Route::get('box/bills-paid', ['uses' => 'JsonController@boxBillsPaid', 'as' => 'box.unpaid']); Route::get('box/bills-paid', ['uses' => 'JsonController@boxBillsPaid', 'as' => 'box.unpaid']);
Route::get('transaction-journals/{what}', ['uses' => 'JsonController@transactionJournals','as' => 'transaction-journals']); Route::get('transaction-journals/{what}', ['uses' => 'JsonController@transactionJournals', 'as' => 'transaction-journals']);
Route::get('trigger', ['uses' => 'JsonController@trigger', 'as' => 'trigger']); Route::get('trigger', ['uses' => 'JsonController@trigger', 'as' => 'trigger']);
Route::get('action', ['uses' => 'JsonController@action', 'as' => 'action']); Route::get('action', ['uses' => 'JsonController@action', 'as' => 'action']);
@@ -531,7 +531,7 @@ Route::group(
Route::get('delete/{rule}', ['uses' => 'RuleController@delete', 'as' => 'delete']); Route::get('delete/{rule}', ['uses' => 'RuleController@delete', 'as' => 'delete']);
Route::get('test', ['uses' => 'RuleController@testTriggers', 'as' => 'test-triggers']); Route::get('test', ['uses' => 'RuleController@testTriggers', 'as' => 'test-triggers']);
Route::post('trigger/order/{rule}', ['uses' => 'RuleController@reorderRuleTriggers','as' => 'reorder-triggers']); Route::post('trigger/order/{rule}', ['uses' => 'RuleController@reorderRuleTriggers', 'as' => 'reorder-triggers']);
Route::post('action/order/{rule}', ['uses' => 'RuleController@reorderRuleActions', 'as' => 'reorder-actions']); Route::post('action/order/{rule}', ['uses' => 'RuleController@reorderRuleActions', 'as' => 'reorder-actions']);
Route::post('store/{ruleGroup}', ['uses' => 'RuleController@store', 'as' => 'store']); Route::post('store/{ruleGroup}', ['uses' => 'RuleController@store', 'as' => 'store']);
Route::post('update/{rule}', ['uses' => 'RuleController@update', 'as' => 'update']); Route::post('update/{rule}', ['uses' => 'RuleController@update', 'as' => 'update']);

View File

@@ -35,7 +35,6 @@ class ConfigurationControllerTest extends TestCase
/** /**
* @covers \FireflyIII\Http\Controllers\Admin\ConfigurationController::index * @covers \FireflyIII\Http\Controllers\Admin\ConfigurationController::index
* Implement testIndex().
*/ */
public function testIndex() public function testIndex()
{ {
@@ -60,7 +59,6 @@ class ConfigurationControllerTest extends TestCase
/** /**
* @covers \FireflyIII\Http\Controllers\Admin\ConfigurationController::store * @covers \FireflyIII\Http\Controllers\Admin\ConfigurationController::store
* Implement testStore().
*/ */
public function testPostIndex() public function testPostIndex()
{ {
@@ -74,12 +72,4 @@ class ConfigurationControllerTest extends TestCase
$this->assertSessionHas('success'); $this->assertSessionHas('success');
$this->assertResponseStatus(302); $this->assertResponseStatus(302);
} }
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}
} }

View File

@@ -31,7 +31,6 @@ class DomainControllerTest extends TestCase
/** /**
* @covers \FireflyIII\Http\Controllers\Admin\DomainController::domains * @covers \FireflyIII\Http\Controllers\Admin\DomainController::domains
* Implement testDomains().
*/ */
public function testDomains() public function testDomains()
{ {
@@ -46,7 +45,6 @@ class DomainControllerTest extends TestCase
/** /**
* @covers \FireflyIII\Http\Controllers\Admin\DomainController::manual * @covers \FireflyIII\Http\Controllers\Admin\DomainController::manual
* Implement testManual().
*/ */
public function testManual() public function testManual()
{ {
@@ -58,7 +56,6 @@ class DomainControllerTest extends TestCase
/** /**
* @covers \FireflyIII\Http\Controllers\Admin\DomainController::toggleDomain * @covers \FireflyIII\Http\Controllers\Admin\DomainController::toggleDomain
* Implement testToggleDomain().
*/ */
public function testToggleDomain() public function testToggleDomain()
{ {
@@ -68,11 +65,4 @@ class DomainControllerTest extends TestCase
$this->assertResponseStatus(302); $this->assertResponseStatus(302);
} }
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}
} }

View File

@@ -31,7 +31,6 @@ class HomeControllerTest extends TestCase
/** /**
* @covers \FireflyIII\Http\Controllers\Admin\HomeController::index * @covers \FireflyIII\Http\Controllers\Admin\HomeController::index
* Implement testIndex().
*/ */
public function testIndex() public function testIndex()
{ {
@@ -42,11 +41,4 @@ class HomeControllerTest extends TestCase
$this->see('<ol class="breadcrumb">'); $this->see('<ol class="breadcrumb">');
} }
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}
} }

View File

@@ -31,7 +31,6 @@ class UserControllerTest extends TestCase
/** /**
* @covers \FireflyIII\Http\Controllers\Admin\UserController::edit * @covers \FireflyIII\Http\Controllers\Admin\UserController::edit
* Implement testEdit().
*/ */
public function testEdit() public function testEdit()
{ {
@@ -44,7 +43,6 @@ class UserControllerTest extends TestCase
/** /**
* @covers \FireflyIII\Http\Controllers\Admin\UserController::index * @covers \FireflyIII\Http\Controllers\Admin\UserController::index
* Implement testIndex().
*/ */
public function testIndex() public function testIndex()
{ {
@@ -57,7 +55,6 @@ class UserControllerTest extends TestCase
/** /**
* @covers \FireflyIII\Http\Controllers\Admin\UserController::show * @covers \FireflyIII\Http\Controllers\Admin\UserController::show
* Implement testShow().
*/ */
public function testShow() public function testShow()
{ {
@@ -68,11 +65,4 @@ class UserControllerTest extends TestCase
$this->see('<ol class="breadcrumb">'); $this->see('<ol class="breadcrumb">');
} }
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}
} }

View File

@@ -35,7 +35,6 @@ class ConfirmationControllerTest extends TestCase
/** /**
* @covers \FireflyIII\Http\Controllers\Auth\ConfirmationController::confirmationError * @covers \FireflyIII\Http\Controllers\Auth\ConfirmationController::confirmationError
* Implement testConfirmationError().
*/ */
public function testConfirmationError() public function testConfirmationError()
{ {
@@ -59,7 +58,6 @@ class ConfirmationControllerTest extends TestCase
/** /**
* @covers \FireflyIII\Http\Controllers\Auth\ConfirmationController::doConfirmation * @covers \FireflyIII\Http\Controllers\Auth\ConfirmationController::doConfirmation
* Implement testDoConfirmation().
*/ */
public function testDoConfirmation() public function testDoConfirmation()
{ {
@@ -84,7 +82,6 @@ class ConfirmationControllerTest extends TestCase
/** /**
* @covers \FireflyIII\Http\Controllers\Auth\ConfirmationController::resendConfirmation * @covers \FireflyIII\Http\Controllers\Auth\ConfirmationController::resendConfirmation
* Implement testResendConfirmation().
*/ */
public function testResendConfirmation() public function testResendConfirmation()
{ {
@@ -111,11 +108,4 @@ class ConfirmationControllerTest extends TestCase
$this->assertResponseStatus(200); $this->assertResponseStatus(200);
} }
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}
} }

View File

@@ -31,7 +31,6 @@ class LoginControllerTest extends TestCase
/** /**
* @covers \FireflyIII\Http\Controllers\Auth\LoginController::login * @covers \FireflyIII\Http\Controllers\Auth\LoginController::login
* Implement testLogin().
*/ */
public function testLogin() public function testLogin()
{ {
@@ -45,7 +44,6 @@ class LoginControllerTest extends TestCase
/** /**
* @covers \FireflyIII\Http\Controllers\Auth\LoginController::logout * @covers \FireflyIII\Http\Controllers\Auth\LoginController::logout
* Implement testLogout().
*/ */
public function testLogout() public function testLogout()
{ {
@@ -56,7 +54,6 @@ class LoginControllerTest extends TestCase
/** /**
* @covers \FireflyIII\Http\Controllers\Auth\LoginController::showLoginForm * @covers \FireflyIII\Http\Controllers\Auth\LoginController::showLoginForm
* Implement testShowLoginForm().
*/ */
public function testShowLoginForm() public function testShowLoginForm()
{ {
@@ -64,12 +61,4 @@ class LoginControllerTest extends TestCase
->seePageIs('/login') ->seePageIs('/login')
->see('Sign in to start your session'); ->see('Sign in to start your session');
} }
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}
} }

View File

@@ -34,7 +34,6 @@ class TwoFactorControllerTest extends TestCase
/** /**
* @covers \FireflyIII\Http\Controllers\Auth\TwoFactorController::index * @covers \FireflyIII\Http\Controllers\Auth\TwoFactorController::index
* Implement testIndex().
*/ */
public function testIndex() public function testIndex()
{ {
@@ -54,7 +53,6 @@ class TwoFactorControllerTest extends TestCase
/** /**
* @covers \FireflyIII\Http\Controllers\Auth\TwoFactorController::lostTwoFactor * @covers \FireflyIII\Http\Controllers\Auth\TwoFactorController::lostTwoFactor
* Implement testLostTwoFactor().
*/ */
public function testLostTwoFactor() public function testLostTwoFactor()
{ {
@@ -72,11 +70,4 @@ class TwoFactorControllerTest extends TestCase
$this->assertResponseStatus(200); $this->assertResponseStatus(200);
} }
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}
} }

View File

@@ -31,73 +31,78 @@ class AccountControllerTest extends TestCase
/** /**
* @covers \FireflyIII\Http\Controllers\Chart\AccountController::expenseAccounts * @covers \FireflyIII\Http\Controllers\Chart\AccountController::expenseAccounts
* Implement testExpenseAccounts(). * @dataProvider dateRangeProvider
*/ */
public function testExpenseAccounts() public function testExpenseAccounts(string $range)
{ {
$this->be($this->user()); $this->be($this->user());
$this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.account.expense')); $this->call('get', route('chart.account.expense'));
$this->assertResponseStatus(200); $this->assertResponseStatus(200);
} }
/** /**
* @covers \FireflyIII\Http\Controllers\Chart\AccountController::expenseBudget * @covers \FireflyIII\Http\Controllers\Chart\AccountController::expenseBudget
* Implement testExpenseBudget(). * @dataProvider dateRangeProvider
*/ */
public function testExpenseBudget() public function testExpenseBudget(string $range)
{ {
$this->be($this->user()); $this->be($this->user());
$this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.account.expense-budget', [1, '20120101', '20120131'])); $this->call('get', route('chart.account.expense-budget', [1, '20120101', '20120131']));
$this->assertResponseStatus(200); $this->assertResponseStatus(200);
} }
/** /**
* @covers \FireflyIII\Http\Controllers\Chart\AccountController::expenseCategory * @covers \FireflyIII\Http\Controllers\Chart\AccountController::expenseCategory
* Implement testExpenseCategory(). * @dataProvider dateRangeProvider
*/ */
public function testExpenseCategory() public function testExpenseCategory(string $range)
{ {
$this->be($this->user()); $this->be($this->user());
$this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.account.expense-category', [1, '20120101', '20120131'])); $this->call('get', route('chart.account.expense-category', [1, '20120101', '20120131']));
$this->assertResponseStatus(200); $this->assertResponseStatus(200);
} }
/** /**
* @covers \FireflyIII\Http\Controllers\Chart\AccountController::frontpage * @covers \FireflyIII\Http\Controllers\Chart\AccountController::frontpage
* Implement testFrontpage(). * @dataProvider dateRangeProvider
*/ */
public function testFrontpage() public function testFrontpage(string $range)
{ {
$this->be($this->user()); $this->be($this->user());
$this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.account.frontpage')); $this->call('get', route('chart.account.frontpage'));
$this->assertResponseStatus(200); $this->assertResponseStatus(200);
} }
/** /**
* @covers \FireflyIII\Http\Controllers\Chart\AccountController::incomeCategory * @covers \FireflyIII\Http\Controllers\Chart\AccountController::incomeCategory
* Implement testIncomeCategory(). * @dataProvider dateRangeProvider
*/ */
public function testIncomeCategory() public function testIncomeCategory(string $range)
{ {
$this->be($this->user()); $this->be($this->user());
$this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.account.income-category', [1, '20120101', '20120131'])); $this->call('get', route('chart.account.income-category', [1, '20120101', '20120131']));
$this->assertResponseStatus(200); $this->assertResponseStatus(200);
} }
/** /**
* @covers \FireflyIII\Http\Controllers\Chart\AccountController::period * @covers \FireflyIII\Http\Controllers\Chart\AccountController::period
* Implement testSpecificPeriod(). * @dataProvider dateRangeProvider
*/ */
public function testPeriod() public function testPeriod(string $range)
{ {
$this->be($this->user()); $this->be($this->user());
$this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.account.period', [1, '2012-01-01'])); $this->call('get', route('chart.account.period', [1, '2012-01-01']));
$this->assertResponseStatus(200); $this->assertResponseStatus(200);
} }
/** /**
* @covers \FireflyIII\Http\Controllers\Chart\AccountController::report * @covers \FireflyIII\Http\Controllers\Chart\AccountController::report
* Implement testReport().
*/ */
public function testReport() public function testReport()
{ {
@@ -108,31 +113,26 @@ class AccountControllerTest extends TestCase
/** /**
* @covers \FireflyIII\Http\Controllers\Chart\AccountController::revenueAccounts * @covers \FireflyIII\Http\Controllers\Chart\AccountController::revenueAccounts
* Implement testRevenueAccounts(). * @dataProvider dateRangeProvider
*/ */
public function testRevenueAccounts() public function testRevenueAccounts(string $range)
{ {
$this->be($this->user()); $this->be($this->user());
$this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.account.revenue')); $this->call('get', route('chart.account.revenue'));
$this->assertResponseStatus(200); $this->assertResponseStatus(200);
} }
/** /**
* @covers \FireflyIII\Http\Controllers\Chart\AccountController::single * @covers \FireflyIII\Http\Controllers\Chart\AccountController::single
* Implement testSingle(). * @dataProvider dateRangeProvider
*/ */
public function testSingle() public function testSingle(string $range)
{ {
$this->be($this->user()); $this->be($this->user());
$this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.account.single', [1])); $this->call('get', route('chart.account.single', [1]));
$this->assertResponseStatus(200); $this->assertResponseStatus(200);
} }
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}
} }

View File

@@ -31,33 +31,24 @@ class BillControllerTest extends TestCase
/** /**
* @covers \FireflyIII\Http\Controllers\Chart\BillController::frontpage * @covers \FireflyIII\Http\Controllers\Chart\BillController::frontpage
* Implement testFrontpage(). * @dataProvider dateRangeProvider
*/ */
public function testFrontpage() public function testFrontpage(string $range)
{ {
// Remove the following lines when you implement this test. $this->be($this->user());
$this->markTestIncomplete( $this->changeDateRange($this->user(), $range);
'This test has not been implemented yet.' $this->call('get', route('chart.bill.frontpage'));
); $this->assertResponseStatus(200);
} }
/** /**
* @covers \FireflyIII\Http\Controllers\Chart\BillController::single * @covers \FireflyIII\Http\Controllers\Chart\BillController::single
* Implement testSingle().
*/ */
public function testSingle() public function testSingle()
{ {
// Remove the following lines when you implement this test. $this->be($this->user());
$this->markTestIncomplete( $this->call('get', route('chart.bill.single', [1]));
'This test has not been implemented yet.' $this->assertResponseStatus(200);
);
} }
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}
} }

View File

@@ -31,69 +31,57 @@ class BudgetControllerTest extends TestCase
/** /**
* @covers \FireflyIII\Http\Controllers\Chart\BudgetController::budget * @covers \FireflyIII\Http\Controllers\Chart\BudgetController::budget
* Implement testBudget(). * @dataProvider dateRangeProvider
*/ */
public function testBudget() public function testBudget(string $range)
{ {
// Remove the following lines when you implement this test. $this->be($this->user());
$this->markTestIncomplete( $this->changeDateRange($this->user(), $range);
'This test has not been implemented yet.' $this->call('get', route('chart.budget.budget', [1]));
); $this->assertResponseStatus(200);
} }
/** /**
* @covers \FireflyIII\Http\Controllers\Chart\BudgetController::budgetLimit * @covers \FireflyIII\Http\Controllers\Chart\BudgetController::budgetLimit
* Implement testBudgetLimit(). * @dataProvider dateRangeProvider
*/ */
public function testBudgetLimit() public function testBudgetLimit(string $range)
{ {
// Remove the following lines when you implement this test. $this->be($this->user());
$this->markTestIncomplete( $this->changeDateRange($this->user(), $range);
'This test has not been implemented yet.' $this->call('get', route('chart.budget.budget', [1,1]));
); $this->assertResponseStatus(200);
} }
/** /**
* @covers \FireflyIII\Http\Controllers\Chart\BudgetController::frontpage * @covers \FireflyIII\Http\Controllers\Chart\BudgetController::frontpage
* Implement testFrontpage(). * @dataProvider dateRangeProvider
*/ */
public function testFrontpage() public function testFrontpage(string $range)
{ {
// Remove the following lines when you implement this test. $this->be($this->user());
$this->markTestIncomplete( $this->changeDateRange($this->user(), $range);
'This test has not been implemented yet.' $this->call('get', route('chart.budget.frontpage'));
); $this->assertResponseStatus(200);
} }
/** /**
* @covers \FireflyIII\Http\Controllers\Chart\BudgetController::period * @covers \FireflyIII\Http\Controllers\Chart\BudgetController::period
* Implement testPeriod().
*/ */
public function testPeriod() public function testPeriod()
{ {
// Remove the following lines when you implement this test. $this->be($this->user());
$this->markTestIncomplete( $this->call('get', route('chart.budget.period', [1,'1','20120101','20120131']));
'This test has not been implemented yet.' $this->assertResponseStatus(200);
);
} }
/** /**
* @covers \FireflyIII\Http\Controllers\Chart\BudgetController::periodNoBudget * @covers \FireflyIII\Http\Controllers\Chart\BudgetController::periodNoBudget
* Implement testPeriodNoBudget().
*/ */
public function testPeriodNoBudget() public function testPeriodNoBudget()
{ {
// Remove the following lines when you implement this test. $this->be($this->user());
$this->markTestIncomplete( $this->call('get', route('chart.budget.period.no-budget', ['1','20120101','20120131']));
'This test has not been implemented yet.' $this->assertResponseStatus(200);
);
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
} }
} }

View File

@@ -31,81 +31,69 @@ class CategoryControllerTest extends TestCase
/** /**
* @covers \FireflyIII\Http\Controllers\Chart\CategoryController::all * @covers \FireflyIII\Http\Controllers\Chart\CategoryController::all
* Implement testAll(). * @dataProvider dateRangeProvider
*/ */
public function testAll() public function testAll(string $range)
{ {
// Remove the following lines when you implement this test. $this->be($this->user());
$this->markTestIncomplete( $this->changeDateRange($this->user(), $range);
'This test has not been implemented yet.' $this->call('get', route('chart.category.all', [1]));
); $this->assertResponseStatus(200);
} }
/** /**
* @covers \FireflyIII\Http\Controllers\Chart\CategoryController::currentPeriod * @covers \FireflyIII\Http\Controllers\Chart\CategoryController::currentPeriod
* Implement testCurrentPeriod(). * @dataProvider dateRangeProvider
*/ */
public function testCurrentPeriod() public function testCurrentPeriod(string $range)
{ {
// Remove the following lines when you implement this test. $this->be($this->user());
$this->markTestIncomplete( $this->changeDateRange($this->user(), $range);
'This test has not been implemented yet.' $this->call('get', route('chart.category.current', [1]));
); $this->assertResponseStatus(200);
} }
/** /**
* @covers \FireflyIII\Http\Controllers\Chart\CategoryController::frontpage * @covers \FireflyIII\Http\Controllers\Chart\CategoryController::frontpage
* Implement testFrontpage(). * @dataProvider dateRangeProvider
*/ */
public function testFrontpage() public function testFrontpage(string $range)
{ {
// Remove the following lines when you implement this test. $this->be($this->user());
$this->markTestIncomplete( $this->changeDateRange($this->user(), $range);
'This test has not been implemented yet.' $this->call('get', route('chart.category.current', [1]));
); $this->assertResponseStatus(200);
} }
/** /**
* @covers \FireflyIII\Http\Controllers\Chart\CategoryController::reportPeriod * @covers \FireflyIII\Http\Controllers\Chart\CategoryController::reportPeriod
* Implement testReportPeriod().
*/ */
public function testReportPeriod() public function testReportPeriod()
{ {
// Remove the following lines when you implement this test. $this->be($this->user());
$this->markTestIncomplete( $this->call('get', route('chart.category.period', [1, '1', '20120101', '20120131']));
'This test has not been implemented yet.' $this->assertResponseStatus(200);
);
} }
/** /**
* @covers \FireflyIII\Http\Controllers\Chart\CategoryController::reportPeriodNoCategory * @covers \FireflyIII\Http\Controllers\Chart\CategoryController::reportPeriodNoCategory
* Implement testReportPeriodNoCategory().
*/ */
public function testReportPeriodNoCategory() public function testReportPeriodNoCategory()
{ {
// Remove the following lines when you implement this test. $this->be($this->user());
$this->markTestIncomplete( $this->call('get', route('chart.category.period.no-category', ['1', '20120101', '20120131']));
'This test has not been implemented yet.' $this->assertResponseStatus(200);
);
} }
/** /**
* @covers \FireflyIII\Http\Controllers\Chart\CategoryController::specificPeriod * @covers \FireflyIII\Http\Controllers\Chart\CategoryController::specificPeriod
* Implement testSpecificPeriod(). * @dataProvider dateRangeProvider
*/ */
public function testSpecificPeriod() public function testSpecificPeriod(string $range)
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{ {
$this->be($this->user());
$this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.category.specific', ['1', '2012-01-01']));
$this->assertResponseStatus(200);
} }
} }

View File

@@ -31,69 +31,52 @@ class CategoryReportControllerTest extends TestCase
/** /**
* @covers \FireflyIII\Http\Controllers\Chart\CategoryReportController::accountExpense * @covers \FireflyIII\Http\Controllers\Chart\CategoryReportController::accountExpense
* Implement testAccountExpense().
*/ */
public function testAccountExpense() public function testAccountExpense()
{ {
// Remove the following lines when you implement this test. $this->be($this->user());
$this->markTestIncomplete( $this->call('get', route('chart.category.account-expense', ['1', '1', '20120101', '20120131', 0]));
'This test has not been implemented yet.' $this->assertResponseStatus(200);
);
} }
/** /**
* @covers \FireflyIII\Http\Controllers\Chart\CategoryReportController::accountIncome * @covers \FireflyIII\Http\Controllers\Chart\CategoryReportController::accountIncome
* Implement testAccountIncome().
*/ */
public function testAccountIncome() public function testAccountIncome()
{ {
// Remove the following lines when you implement this test. $this->be($this->user());
$this->markTestIncomplete( $this->call('get', route('chart.category.account-income', ['1', '1', '20120101', '20120131', 0]));
'This test has not been implemented yet.' $this->assertResponseStatus(200);
);
} }
/** /**
* @covers \FireflyIII\Http\Controllers\Chart\CategoryReportController::categoryExpense * @covers \FireflyIII\Http\Controllers\Chart\CategoryReportController::categoryExpense
* Implement testCategoryExpense().
*/ */
public function testCategoryExpense() public function testCategoryExpense()
{ {
// Remove the following lines when you implement this test. $this->be($this->user());
$this->markTestIncomplete( $this->call('get', route('chart.category.category-expense', ['1', '1', '20120101', '20120131', 0]));
'This test has not been implemented yet.' $this->assertResponseStatus(200);
);
} }
/** /**
* @covers \FireflyIII\Http\Controllers\Chart\CategoryReportController::categoryIncome * @covers \FireflyIII\Http\Controllers\Chart\CategoryReportController::categoryIncome
* Implement testCategoryIncome().
*/ */
public function testCategoryIncome() public function testCategoryIncome()
{ {
// Remove the following lines when you implement this test. $this->be($this->user());
$this->markTestIncomplete( $this->call('get', route('chart.category.category-income', ['1', '1', '20120101', '20120131', 0]));
'This test has not been implemented yet.' $this->assertResponseStatus(200);
);
} }
/** /**
* @covers \FireflyIII\Http\Controllers\Chart\CategoryReportController::mainChart * @covers \FireflyIII\Http\Controllers\Chart\CategoryReportController::mainChart
* Implement testMainChart().
*/ */
public function testMainChart() public function testMainChart()
{ {
// Remove the following lines when you implement this test. $this->be($this->user());
$this->markTestIncomplete( $this->call('get', route('chart.category.main', ['1', '1', '20120101', '20120131']));
'This test has not been implemented yet.' $this->assertResponseStatus(200);
);
} }
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}
} }

View File

@@ -31,21 +31,11 @@ class PiggyBankControllerTest extends TestCase
/** /**
* @covers \FireflyIII\Http\Controllers\Chart\PiggyBankController::history * @covers \FireflyIII\Http\Controllers\Chart\PiggyBankController::history
* Implement testHistory().
*/ */
public function testHistory() public function testHistory()
{ {
// Remove the following lines when you implement this test. $this->be($this->user());
$this->markTestIncomplete( $this->call('get', route('chart.piggy-bank.history', [1]));
'This test has not been implemented yet.' $this->assertResponseStatus(200);
);
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
} }
} }

View File

@@ -31,45 +31,31 @@ class ReportControllerTest extends TestCase
/** /**
* @covers \FireflyIII\Http\Controllers\Chart\ReportController::netWorth * @covers \FireflyIII\Http\Controllers\Chart\ReportController::netWorth
* Implement testNetWorth().
*/ */
public function testNetWorth() public function testNetWorth()
{ {
// Remove the following lines when you implement this test. $this->be($this->user());
$this->markTestIncomplete( $this->call('get', route('chart.report.net-worth', [1, '20120101', '20120131']));
'This test has not been implemented yet.' $this->assertResponseStatus(200);
);
} }
/** /**
* @covers \FireflyIII\Http\Controllers\Chart\ReportController::operations * @covers \FireflyIII\Http\Controllers\Chart\ReportController::operations
* Implement testOperations().
*/ */
public function testOperations() public function testOperations()
{ {
// Remove the following lines when you implement this test. $this->be($this->user());
$this->markTestIncomplete( $this->call('get', route('chart.report.operations', [1, '20120101', '20120131']));
'This test has not been implemented yet.' $this->assertResponseStatus(200);
);
} }
/** /**
* @covers \FireflyIII\Http\Controllers\Chart\ReportController::sum * @covers \FireflyIII\Http\Controllers\Chart\ReportController::sum
* Implement testSum().
*/ */
public function testSum() public function testSum()
{ {
// Remove the following lines when you implement this test. $this->be($this->user());
$this->markTestIncomplete( $this->call('get', route('chart.report.sum', [1, '20120101', '20120131']));
'This test has not been implemented yet.' $this->assertResponseStatus(200);
);
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
} }
} }

View File

@@ -58,7 +58,7 @@ class HomeControllerTest extends TestCase
* *
* @param $range * @param $range
*/ */
public function testIndex($range) public function testIndex(string $range)
{ {
$this->be($this->user()); $this->be($this->user());
$this->changeDateRange($this->user(), $range); $this->changeDateRange($this->user(), $range);