diff --git a/app/Support/Navigation.php b/app/Support/Navigation.php
index 48ff2724fb..f36d54e054 100644
--- a/app/Support/Navigation.php
+++ b/app/Support/Navigation.php
@@ -43,6 +43,7 @@ class Navigation
'1M' => 'addMonths', 'month' => 'addMonths', 'monthly' => 'addMonths', '3M' => 'addMonths',
'quarter' => 'addMonths', 'quarterly' => 'addMonths', '6M' => 'addMonths', 'half-year' => 'addMonths',
'year' => 'addYears', 'yearly' => 'addYears', '1Y' => 'addYears',
+ 'custom' => 'addMonths', // custom? just add one month.
];
$modifierMap = [
'quarter' => 3,
diff --git a/routes/web.php b/routes/web.php
index 33952a68c8..7a10a32aba 100755
--- a/routes/web.php
+++ b/routes/web.php
@@ -255,10 +255,9 @@ Route::group(
Route::group(
['middleware' => 'user-full-auth', 'namespace' => 'Chart', 'prefix' => 'chart/budget', 'as' => 'chart.budget.'], function () {
- Route::get('frontpage', ['uses' => 'BudgetController@frontpage']);
-
- Route::get('period/0/{accountList}/{start_date}/{end_date}', ['uses' => 'BudgetController@periodNoBudget']);
- Route::get('period/{budget}/{accountList}/{start_date}/{end_date}', ['uses' => 'BudgetController@period']);
+ 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/{budget}/{accountList}/{start_date}/{end_date}', ['uses' => 'BudgetController@period', 'as' => 'period']);
Route::get('budget/{budget}/{limitrepetition}', ['uses' => 'BudgetController@budgetLimit', 'as' => 'budget-limit']);
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 () {
Route::get('frontpage', ['uses' => 'CategoryController@frontpage']);
-
Route::get('period/{category}', ['uses' => 'CategoryController@currentPeriod', 'as' => 'current']);
Route::get('period/{category}/{date}', ['uses' => 'CategoryController@specificPeriod', 'as' => 'specific']);
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/{category}/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@reportPeriod']);
+ 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', 'as' => 'period']);
// these charts are used in reports (category reports):
Route::get(
@@ -297,8 +295,10 @@ Route::group(
['uses' => 'CategoryReportController@accountExpense', 'as' => 'account-expense']
);
- Route::get('report-in-out/{accountList}/{categoryList}/{start_date}/{end_date}',
- ['uses' => 'CategoryReportController@mainChart', 'as' => 'main']);
+ Route::get(
+ 'report-in-out/{accountList}/{categoryList}/{start_date}/{end_date}',
+ ['uses' => 'CategoryReportController@mainChart', 'as' => 'main']
+ );
}
);
@@ -307,8 +307,8 @@ Route::group(
* Chart\PiggyBank Controller
*/
Route::group(
- ['middleware' => 'user-full-auth', 'namespace' => 'Chart', 'prefix' => 'chart/piggy-bank'], function () {
- Route::get('{piggyBank}', ['uses' => 'PiggyBankController@history']);
+ ['middleware' => 'user-full-auth', 'namespace' => 'Chart', 'prefix' => 'chart/piggy-bank','as'=> 'chart.piggy-bank.'], function () {
+ Route::get('{piggyBank}', ['uses' => 'PiggyBankController@history','as' => 'history']);
}
);
@@ -317,7 +317,7 @@ Route::group(
*/
Route::group(
['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('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/bills-unpaid', ['uses' => 'JsonController@boxBillsUnpaid', 'as' => 'box.paid']);
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('action', ['uses' => 'JsonController@action', 'as' => 'action']);
@@ -531,7 +531,7 @@ Route::group(
Route::get('delete/{rule}', ['uses' => 'RuleController@delete', 'as' => 'delete']);
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('store/{ruleGroup}', ['uses' => 'RuleController@store', 'as' => 'store']);
Route::post('update/{rule}', ['uses' => 'RuleController@update', 'as' => 'update']);
diff --git a/tests/acceptance/Controllers/Admin/ConfigurationControllerTest.php b/tests/acceptance/Controllers/Admin/ConfigurationControllerTest.php
index 0dae2ce618..4e4e5982fc 100644
--- a/tests/acceptance/Controllers/Admin/ConfigurationControllerTest.php
+++ b/tests/acceptance/Controllers/Admin/ConfigurationControllerTest.php
@@ -35,7 +35,6 @@ class ConfigurationControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Admin\ConfigurationController::index
- * Implement testIndex().
*/
public function testIndex()
{
@@ -60,7 +59,6 @@ class ConfigurationControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Admin\ConfigurationController::store
- * Implement testStore().
*/
public function testPostIndex()
{
@@ -74,12 +72,4 @@ class ConfigurationControllerTest extends TestCase
$this->assertSessionHas('success');
$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()
- {
- }
}
diff --git a/tests/acceptance/Controllers/Admin/DomainControllerTest.php b/tests/acceptance/Controllers/Admin/DomainControllerTest.php
index 8617ca3815..bba83a9265 100644
--- a/tests/acceptance/Controllers/Admin/DomainControllerTest.php
+++ b/tests/acceptance/Controllers/Admin/DomainControllerTest.php
@@ -31,7 +31,6 @@ class DomainControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Admin\DomainController::domains
- * Implement testDomains().
*/
public function testDomains()
{
@@ -46,7 +45,6 @@ class DomainControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Admin\DomainController::manual
- * Implement testManual().
*/
public function testManual()
{
@@ -58,7 +56,6 @@ class DomainControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Admin\DomainController::toggleDomain
- * Implement testToggleDomain().
*/
public function testToggleDomain()
{
@@ -68,11 +65,4 @@ class DomainControllerTest extends TestCase
$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()
- {
- }
}
diff --git a/tests/acceptance/Controllers/Admin/HomeControllerTest.php b/tests/acceptance/Controllers/Admin/HomeControllerTest.php
index 999e7e6554..8a2ccefb60 100644
--- a/tests/acceptance/Controllers/Admin/HomeControllerTest.php
+++ b/tests/acceptance/Controllers/Admin/HomeControllerTest.php
@@ -31,7 +31,6 @@ class HomeControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Admin\HomeController::index
- * Implement testIndex().
*/
public function testIndex()
{
@@ -42,11 +41,4 @@ class HomeControllerTest extends TestCase
$this->see('
');
}
- /**
- * Tears down the fixture, for example, closes a network connection.
- * This method is called after a test is executed.
- */
- protected function tearDown()
- {
- }
}
diff --git a/tests/acceptance/Controllers/Admin/UserControllerTest.php b/tests/acceptance/Controllers/Admin/UserControllerTest.php
index 68e06fd69a..b5e246bc4d 100644
--- a/tests/acceptance/Controllers/Admin/UserControllerTest.php
+++ b/tests/acceptance/Controllers/Admin/UserControllerTest.php
@@ -31,7 +31,6 @@ class UserControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Admin\UserController::edit
- * Implement testEdit().
*/
public function testEdit()
{
@@ -44,7 +43,6 @@ class UserControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Admin\UserController::index
- * Implement testIndex().
*/
public function testIndex()
{
@@ -57,7 +55,6 @@ class UserControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Admin\UserController::show
- * Implement testShow().
*/
public function testShow()
{
@@ -68,11 +65,4 @@ class UserControllerTest extends TestCase
$this->see('');
}
- /**
- * Tears down the fixture, for example, closes a network connection.
- * This method is called after a test is executed.
- */
- protected function tearDown()
- {
- }
}
diff --git a/tests/acceptance/Controllers/Auth/ConfirmationControllerTest.php b/tests/acceptance/Controllers/Auth/ConfirmationControllerTest.php
index d8af8c900d..d4dd7aff33 100644
--- a/tests/acceptance/Controllers/Auth/ConfirmationControllerTest.php
+++ b/tests/acceptance/Controllers/Auth/ConfirmationControllerTest.php
@@ -35,7 +35,6 @@ class ConfirmationControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Auth\ConfirmationController::confirmationError
- * Implement testConfirmationError().
*/
public function testConfirmationError()
{
@@ -59,7 +58,6 @@ class ConfirmationControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Auth\ConfirmationController::doConfirmation
- * Implement testDoConfirmation().
*/
public function testDoConfirmation()
{
@@ -84,7 +82,6 @@ class ConfirmationControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Auth\ConfirmationController::resendConfirmation
- * Implement testResendConfirmation().
*/
public function testResendConfirmation()
{
@@ -111,11 +108,4 @@ class ConfirmationControllerTest extends TestCase
$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()
- {
- }
}
diff --git a/tests/acceptance/Controllers/Auth/LoginControllerTest.php b/tests/acceptance/Controllers/Auth/LoginControllerTest.php
index 750e8ba28f..5125dccb98 100644
--- a/tests/acceptance/Controllers/Auth/LoginControllerTest.php
+++ b/tests/acceptance/Controllers/Auth/LoginControllerTest.php
@@ -31,7 +31,6 @@ class LoginControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Auth\LoginController::login
- * Implement testLogin().
*/
public function testLogin()
{
@@ -45,7 +44,6 @@ class LoginControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Auth\LoginController::logout
- * Implement testLogout().
*/
public function testLogout()
{
@@ -56,7 +54,6 @@ class LoginControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Auth\LoginController::showLoginForm
- * Implement testShowLoginForm().
*/
public function testShowLoginForm()
{
@@ -64,12 +61,4 @@ class LoginControllerTest extends TestCase
->seePageIs('/login')
->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()
- {
- }
}
diff --git a/tests/acceptance/Controllers/Auth/TwoFactorControllerTest.php b/tests/acceptance/Controllers/Auth/TwoFactorControllerTest.php
index a01fa4c750..d23aeb4928 100644
--- a/tests/acceptance/Controllers/Auth/TwoFactorControllerTest.php
+++ b/tests/acceptance/Controllers/Auth/TwoFactorControllerTest.php
@@ -34,7 +34,6 @@ class TwoFactorControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Auth\TwoFactorController::index
- * Implement testIndex().
*/
public function testIndex()
{
@@ -54,7 +53,6 @@ class TwoFactorControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Auth\TwoFactorController::lostTwoFactor
- * Implement testLostTwoFactor().
*/
public function testLostTwoFactor()
{
@@ -72,11 +70,4 @@ class TwoFactorControllerTest extends TestCase
$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()
- {
- }
}
diff --git a/tests/acceptance/Controllers/Chart/AccountControllerTest.php b/tests/acceptance/Controllers/Chart/AccountControllerTest.php
index a113d151de..38ff8191bf 100644
--- a/tests/acceptance/Controllers/Chart/AccountControllerTest.php
+++ b/tests/acceptance/Controllers/Chart/AccountControllerTest.php
@@ -30,74 +30,79 @@ class AccountControllerTest extends TestCase
}
/**
- * @covers \FireflyIII\Http\Controllers\Chart\AccountController::expenseAccounts
- * Implement testExpenseAccounts().
+ * @covers \FireflyIII\Http\Controllers\Chart\AccountController::expenseAccounts
+ * @dataProvider dateRangeProvider
*/
- public function testExpenseAccounts()
+ public function testExpenseAccounts(string $range)
{
$this->be($this->user());
+ $this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.account.expense'));
$this->assertResponseStatus(200);
}
/**
- * @covers \FireflyIII\Http\Controllers\Chart\AccountController::expenseBudget
- * Implement testExpenseBudget().
+ * @covers \FireflyIII\Http\Controllers\Chart\AccountController::expenseBudget
+ * @dataProvider dateRangeProvider
*/
- public function testExpenseBudget()
+ public function testExpenseBudget(string $range)
{
$this->be($this->user());
+ $this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.account.expense-budget', [1, '20120101', '20120131']));
$this->assertResponseStatus(200);
}
/**
- * @covers \FireflyIII\Http\Controllers\Chart\AccountController::expenseCategory
- * Implement testExpenseCategory().
+ * @covers \FireflyIII\Http\Controllers\Chart\AccountController::expenseCategory
+ * @dataProvider dateRangeProvider
*/
- public function testExpenseCategory()
+ public function testExpenseCategory(string $range)
{
$this->be($this->user());
+ $this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.account.expense-category', [1, '20120101', '20120131']));
$this->assertResponseStatus(200);
}
/**
- * @covers \FireflyIII\Http\Controllers\Chart\AccountController::frontpage
- * Implement testFrontpage().
+ * @covers \FireflyIII\Http\Controllers\Chart\AccountController::frontpage
+ * @dataProvider dateRangeProvider
*/
- public function testFrontpage()
+ public function testFrontpage(string $range)
{
$this->be($this->user());
+ $this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.account.frontpage'));
$this->assertResponseStatus(200);
}
/**
- * @covers \FireflyIII\Http\Controllers\Chart\AccountController::incomeCategory
- * Implement testIncomeCategory().
+ * @covers \FireflyIII\Http\Controllers\Chart\AccountController::incomeCategory
+ * @dataProvider dateRangeProvider
*/
- public function testIncomeCategory()
+ public function testIncomeCategory(string $range)
{
$this->be($this->user());
+ $this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.account.income-category', [1, '20120101', '20120131']));
$this->assertResponseStatus(200);
}
/**
- * @covers \FireflyIII\Http\Controllers\Chart\AccountController::period
- * Implement testSpecificPeriod().
+ * @covers \FireflyIII\Http\Controllers\Chart\AccountController::period
+ * @dataProvider dateRangeProvider
*/
- public function testPeriod()
+ public function testPeriod(string $range)
{
$this->be($this->user());
+ $this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.account.period', [1, '2012-01-01']));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\AccountController::report
- * Implement testReport().
*/
public function testReport()
{
@@ -107,32 +112,27 @@ class AccountControllerTest extends TestCase
}
/**
- * @covers \FireflyIII\Http\Controllers\Chart\AccountController::revenueAccounts
- * Implement testRevenueAccounts().
+ * @covers \FireflyIII\Http\Controllers\Chart\AccountController::revenueAccounts
+ * @dataProvider dateRangeProvider
*/
- public function testRevenueAccounts()
+ public function testRevenueAccounts(string $range)
{
$this->be($this->user());
+ $this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.account.revenue'));
$this->assertResponseStatus(200);
}
/**
- * @covers \FireflyIII\Http\Controllers\Chart\AccountController::single
- * Implement testSingle().
+ * @covers \FireflyIII\Http\Controllers\Chart\AccountController::single
+ * @dataProvider dateRangeProvider
*/
- public function testSingle()
+ public function testSingle(string $range)
{
$this->be($this->user());
+ $this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.account.single', [1]));
$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()
- {
- }
}
diff --git a/tests/acceptance/Controllers/Chart/BillControllerTest.php b/tests/acceptance/Controllers/Chart/BillControllerTest.php
index 3869ef6d38..63b4644ee8 100644
--- a/tests/acceptance/Controllers/Chart/BillControllerTest.php
+++ b/tests/acceptance/Controllers/Chart/BillControllerTest.php
@@ -31,33 +31,24 @@ class BillControllerTest extends TestCase
/**
* @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->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
+ $this->be($this->user());
+ $this->changeDateRange($this->user(), $range);
+ $this->call('get', route('chart.bill.frontpage'));
+ $this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\BillController::single
- * Implement testSingle().
*/
public function testSingle()
{
- // 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', route('chart.bill.single', [1]));
+ $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()
- {
- }
}
diff --git a/tests/acceptance/Controllers/Chart/BudgetControllerTest.php b/tests/acceptance/Controllers/Chart/BudgetControllerTest.php
index 2fe93015c3..49e1a45c1e 100644
--- a/tests/acceptance/Controllers/Chart/BudgetControllerTest.php
+++ b/tests/acceptance/Controllers/Chart/BudgetControllerTest.php
@@ -31,69 +31,57 @@ class BudgetControllerTest extends TestCase
/**
* @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->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
+ $this->be($this->user());
+ $this->changeDateRange($this->user(), $range);
+ $this->call('get', route('chart.budget.budget', [1]));
+ $this->assertResponseStatus(200);
}
/**
* @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->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
+ $this->be($this->user());
+ $this->changeDateRange($this->user(), $range);
+ $this->call('get', route('chart.budget.budget', [1,1]));
+ $this->assertResponseStatus(200);
}
/**
* @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->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
+ $this->be($this->user());
+ $this->changeDateRange($this->user(), $range);
+ $this->call('get', route('chart.budget.frontpage'));
+ $this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\BudgetController::period
- * Implement testPeriod().
*/
public function testPeriod()
{
- // 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', route('chart.budget.period', [1,'1','20120101','20120131']));
+ $this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\BudgetController::periodNoBudget
- * Implement testPeriodNoBudget().
*/
public function testPeriodNoBudget()
{
- // 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->call('get', route('chart.budget.period.no-budget', ['1','20120101','20120131']));
+ $this->assertResponseStatus(200);
}
}
diff --git a/tests/acceptance/Controllers/Chart/CategoryControllerTest.php b/tests/acceptance/Controllers/Chart/CategoryControllerTest.php
index 75d710a023..74b258349a 100644
--- a/tests/acceptance/Controllers/Chart/CategoryControllerTest.php
+++ b/tests/acceptance/Controllers/Chart/CategoryControllerTest.php
@@ -30,82 +30,70 @@ class CategoryControllerTest extends TestCase
}
/**
- * @covers \FireflyIII\Http\Controllers\Chart\CategoryController::all
- * Implement testAll().
+ * @covers \FireflyIII\Http\Controllers\Chart\CategoryController::all
+ * @dataProvider dateRangeProvider
*/
- public function testAll()
+ public function testAll(string $range)
{
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
+ $this->be($this->user());
+ $this->changeDateRange($this->user(), $range);
+ $this->call('get', route('chart.category.all', [1]));
+ $this->assertResponseStatus(200);
}
/**
- * @covers \FireflyIII\Http\Controllers\Chart\CategoryController::currentPeriod
- * Implement testCurrentPeriod().
+ * @covers \FireflyIII\Http\Controllers\Chart\CategoryController::currentPeriod
+ * @dataProvider dateRangeProvider
*/
- public function testCurrentPeriod()
+ public function testCurrentPeriod(string $range)
{
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
+ $this->be($this->user());
+ $this->changeDateRange($this->user(), $range);
+ $this->call('get', route('chart.category.current', [1]));
+ $this->assertResponseStatus(200);
}
/**
- * @covers \FireflyIII\Http\Controllers\Chart\CategoryController::frontpage
- * Implement testFrontpage().
+ * @covers \FireflyIII\Http\Controllers\Chart\CategoryController::frontpage
+ * @dataProvider dateRangeProvider
*/
- public function testFrontpage()
+ public function testFrontpage(string $range)
{
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
+ $this->be($this->user());
+ $this->changeDateRange($this->user(), $range);
+ $this->call('get', route('chart.category.current', [1]));
+ $this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\CategoryController::reportPeriod
- * Implement testReportPeriod().
*/
public function testReportPeriod()
{
- // 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', route('chart.category.period', [1, '1', '20120101', '20120131']));
+ $this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\CategoryController::reportPeriodNoCategory
- * Implement testReportPeriodNoCategory().
*/
public function testReportPeriodNoCategory()
{
- // 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', route('chart.category.period.no-category', ['1', '20120101', '20120131']));
+ $this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\CategoryController::specificPeriod
- * Implement testSpecificPeriod().
+ * @dataProvider dateRangeProvider
*/
- public function testSpecificPeriod()
- {
- // 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()
+ public function testSpecificPeriod(string $range)
{
+ $this->be($this->user());
+ $this->changeDateRange($this->user(), $range);
+ $this->call('get', route('chart.category.specific', ['1', '2012-01-01']));
+ $this->assertResponseStatus(200);
}
}
diff --git a/tests/acceptance/Controllers/Chart/CategoryReportControllerTest.php b/tests/acceptance/Controllers/Chart/CategoryReportControllerTest.php
index 888880879a..ba948c67ae 100644
--- a/tests/acceptance/Controllers/Chart/CategoryReportControllerTest.php
+++ b/tests/acceptance/Controllers/Chart/CategoryReportControllerTest.php
@@ -31,69 +31,52 @@ class CategoryReportControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Chart\CategoryReportController::accountExpense
- * Implement testAccountExpense().
*/
public function testAccountExpense()
{
- // 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', route('chart.category.account-expense', ['1', '1', '20120101', '20120131', 0]));
+ $this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\CategoryReportController::accountIncome
- * Implement testAccountIncome().
*/
public function testAccountIncome()
{
- // 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', route('chart.category.account-income', ['1', '1', '20120101', '20120131', 0]));
+ $this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\CategoryReportController::categoryExpense
- * Implement testCategoryExpense().
*/
public function testCategoryExpense()
{
- // 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', route('chart.category.category-expense', ['1', '1', '20120101', '20120131', 0]));
+ $this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\CategoryReportController::categoryIncome
- * Implement testCategoryIncome().
*/
public function testCategoryIncome()
{
- // 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', route('chart.category.category-income', ['1', '1', '20120101', '20120131', 0]));
+ $this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\CategoryReportController::mainChart
- * Implement testMainChart().
*/
public function testMainChart()
{
- // 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', route('chart.category.main', ['1', '1', '20120101', '20120131']));
+ $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()
- {
- }
}
diff --git a/tests/acceptance/Controllers/Chart/PiggyBankControllerTest.php b/tests/acceptance/Controllers/Chart/PiggyBankControllerTest.php
index ac393cf31d..f368213e00 100644
--- a/tests/acceptance/Controllers/Chart/PiggyBankControllerTest.php
+++ b/tests/acceptance/Controllers/Chart/PiggyBankControllerTest.php
@@ -31,21 +31,11 @@ class PiggyBankControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Chart\PiggyBankController::history
- * Implement testHistory().
*/
public function testHistory()
{
- // 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->call('get', route('chart.piggy-bank.history', [1]));
+ $this->assertResponseStatus(200);
}
}
diff --git a/tests/acceptance/Controllers/Chart/ReportControllerTest.php b/tests/acceptance/Controllers/Chart/ReportControllerTest.php
index a0bb0dd30e..7b782367bc 100644
--- a/tests/acceptance/Controllers/Chart/ReportControllerTest.php
+++ b/tests/acceptance/Controllers/Chart/ReportControllerTest.php
@@ -31,45 +31,31 @@ class ReportControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Chart\ReportController::netWorth
- * Implement testNetWorth().
*/
public function testNetWorth()
{
- // 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', route('chart.report.net-worth', [1, '20120101', '20120131']));
+ $this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\ReportController::operations
- * Implement testOperations().
*/
public function testOperations()
{
- // 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', route('chart.report.operations', [1, '20120101', '20120131']));
+ $this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\ReportController::sum
- * Implement testSum().
*/
public function testSum()
{
- // 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->call('get', route('chart.report.sum', [1, '20120101', '20120131']));
+ $this->assertResponseStatus(200);
}
}
diff --git a/tests/acceptance/Controllers/HomeControllerTest.php b/tests/acceptance/Controllers/HomeControllerTest.php
index 016a4762d6..5babd78d5c 100755
--- a/tests/acceptance/Controllers/HomeControllerTest.php
+++ b/tests/acceptance/Controllers/HomeControllerTest.php
@@ -58,7 +58,7 @@ class HomeControllerTest extends TestCase
*
* @param $range
*/
- public function testIndex($range)
+ public function testIndex(string $range)
{
$this->be($this->user());
$this->changeDateRange($this->user(), $range);