Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Increased test coverage. Also updated read me.
James Cole48cb528ae4c2
diff --git a/README.md b/README.mdindex bf34ed9ef3..25c2f0d92b 100644--- a/README.md+++ b/README.md@@ -3,6 +3,7 @@ Firefly III[](https://travis-ci.org/JC5/firefly-iii)[](http://stillmaintained.com/JC5/firefly-iii)+[](https://coveralls.io/r/JC5/firefly-iii?branch=master)[](https://packagist.org/packages/grumpydictator/firefly-iii)[](https://packagist.org/packages/grumpydictator/firefly-iii)@@ -25,7 +26,7 @@ laptop and [Firefly II](https://github.com/JC5/Firefly) is live.- Predict and anticipate large expenses using "repeated expenses" (ie. yearly taxes);- Predict and anticipate bills using "recurring transactions" (rent for example);- View basic income / expense reports.--+- Lots of help text in case you don't get it;Everything is organised:@@ -39,15 +40,13 @@ Everything is organised:Firefly III will feature, but does not feature yet:- Financial reporting showing you how well you are doing;-- Lots of help text in case you don't get it;- More control over other resources outside of personal finance- Accounts shared with a partner (household accounts)- Debts- Credit cards-- More test-coverage (aka: actual test coverage);+- More test-coverage;- Firefly will be able to split transactions; a single purchase can be split in multiple entries, for more fine-grained control.- Firefly will be able to join transactions.-- Transfers and transactions are combined into one internal datatype which is more consistent with what you're actually doing: moving money from A to B. The fact that A or B or both are yours should not matter.- Any other features I might not have thought of.Some stuff has been removed:@@ -66,13 +65,9 @@ Some stuff has been removed:## Current state-I have the basics up and running. Test coverage is currently non-existent.+I have the basics up and running. Test coverage is currently coming, slowly.Although I have not checked extensively, some forms and views have CSRF vulnerabilities. This is because not allviews escape all characters by default. Will be fixed.-The current layout / look & feel is a pretty basic Bootstrap3 template. I am currently working on a more consistent,-expanded layout which will feature shiny AJAX things and data tables and all the Web 3.0 goodies you've come to expect-from social media sites.--Questions, ideas or other things to contribute? [Let me know](https://github.com/JC5/firefly-iii/issues/new)!+Questions, ideas or other things to contribute? [Let me know](https://github.com/JC5/firefly-iii/issues/new)!\ No newline at end of filediff --git a/app/controllers/HomeController.php b/app/controllers/HomeController.phpindex 5e944f0386..faea3a7f68 100644--- a/app/controllers/HomeController.php+++ b/app/controllers/HomeController.php@@ -77,7 +77,7 @@ class HomeController extends BaseControllerSession::forget('range');}- return Redirect::back();+ return Redirect::intended('/');}/**@@ -87,7 +87,7 @@ class HomeController extends BaseController{Navigation::next();- return Redirect::back();+ return Redirect::intended('/');}/**@@ -97,6 +97,6 @@ class HomeController extends BaseController{Navigation::prev();- return Redirect::back();+ return Redirect::intended('/');}}\ No newline at end of filediff --git a/app/lib/FireflyIII/Shared/Toolkit/Navigation.php b/app/lib/FireflyIII/Shared/Toolkit/Navigation.phpindex 701bfead28..4800201f30 100644--- a/app/lib/FireflyIII/Shared/Toolkit/Navigation.php+++ b/app/lib/FireflyIII/Shared/Toolkit/Navigation.php@@ -1,6 +1,7 @@<?phpnamespace FireflyIII\Shared\Toolkit;+use Carbon\Carbon;use FireflyIII\Exception\FireflyException;/**@@ -23,7 +24,7 @@ class Navigation$filter = new Filter;$range = $filter->setSessionRangeValue();- $start = \Session::get('start');+ $start = \Session::get('start', Carbon::now()->startOfMonth());/** Add some period to $start.@@ -50,7 +51,7 @@ class Navigation$filter = new Filter;$range = $filter->setSessionRangeValue();- $start = \Session::get('start');+ $start = \Session::get('start', Carbon::now()->startOfMonth());/** Substract some period to $start.diff --git a/tests/functional/HomeControllerCest.php b/tests/functional/HomeControllerCest.phpnew file mode 100644index 0000000000..d6385df4ad--- /dev/null+++ b/tests/functional/HomeControllerCest.php@@ -0,0 +1,75 @@+<?php++/**+ * Class HomeControllerCest+ */+class HomeControllerCest+{+ /**+ * @param FunctionalTester $I+ */+ public function _after(FunctionalTester $I)+ {+ }++ /**+ * @param FunctionalTester $I+ */+ public function _before(FunctionalTester $I)+ {+ $I->amLoggedAs(['email' => '[email protected]', 'password' => 'james']);+ }++ /**+ * @param FunctionalTester $I+ */+ public function flush(FunctionalTester $I)+ {+ $I->wantTo('flush the cache');+ $I->amOnPage('/flush');+ $I->canSeeResponseCodeIs(200);+ $I->see('Firefly');+ }++ /**+ * @param FunctionalTester $I+ */+ public function index(FunctionalTester $I)+ {+ $I->wantTo('see the home page of Firefly');+ $I->amOnPage('/');+ $I->canSeeResponseCodeIs(200);+ $I->see('Firefly');+ }++ /**+ * @param FunctionalTester $I+ */+ public function rangeJump(FunctionalTester $I)+ {+ $I->wantTo('switch to another date range');+ $I->amOnPage('/jump/6M');+ $I->canSeeResponseCodeIs(200);++ }++ /**+ * @param FunctionalTester $I+ */+ public function sessionNext(FunctionalTester $I)+ {+ $I->wantTo('jump to the next period');+ $I->amOnPage('/next');+ $I->canSeeResponseCodeIs(200);+ }++ /**+ * @param FunctionalTester $I+ */+ public function sessionPrev(FunctionalTester $I)+ {+ $I->wantTo('jump to the previous period');+ $I->amOnPage('/prev');+ $I->canSeeResponseCodeIs(200);+ }+}\ No newline at end of file