Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Also covered help.
James Colee62e0345dfce
diff --git a/app/commands/Cleanup.php b/app/commands/Cleanup.phpindex 3250d1d75f..76b734fe53 100644--- a/app/commands/Cleanup.php+++ b/app/commands/Cleanup.php@@ -15,17 +15,13 @@ class Cleanup extends Command** @var string*/- // @codingStandardsIgnoreStartprotected $description = 'Clean caches, regenerate some stuff.';- // @codingStandardsIgnoreEnd/*** The console command name.** @var string*/- // @codingStandardsIgnoreStartprotected $name = 'firefly:cleanup';- // @codingStandardsIgnoreEnd/***diff --git a/app/controllers/PreferencesController.php b/app/controllers/PreferencesController.phpindex ecd536f6c7..852059497c 100644--- a/app/controllers/PreferencesController.php+++ b/app/controllers/PreferencesController.php@@ -3,6 +3,8 @@/*** Class PreferencesController*+ * @SuppressWarnings("CyclomaticComplexity") // It's all 5. So ok.+ **/class PreferencesController extends BaseController{@@ -30,9 +32,10 @@ class PreferencesController extends BaseController$accounts = $acct->getAssetAccounts();$viewRange = $preferences->get('viewRange', '1M');$viewRangeValue = $viewRange->data;- $frontpage = $preferences->get('frontpageAccounts', []);+ $frontPage = $preferences->get('frontpageAccounts', []);+- return View::make('preferences.index')->with('accounts', $accounts)->with('frontpageAccounts', $frontpage)->with('viewRange', $viewRangeValue);+ return View::make('preferences.index')->with('accounts', $accounts)->with('frontpageAccounts', $frontPage)->with('viewRange', $viewRangeValue);}/**diff --git a/tests/functional/HelpControllerCest.php b/tests/functional/HelpControllerCest.phpnew file mode 100644index 0000000000..b728147027--- /dev/null+++ b/tests/functional/HelpControllerCest.php@@ -0,0 +1,76 @@+<?php++/**+ * Class HelpControllerCest+ *+ * @SuppressWarnings("CamelCase")+ * @SuppressWarnings("short")+ */+class HelpControllerCest+{++ /**+ * @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 show(FunctionalTester $I)+ {+ $I->wantTo('show help for the index page');+ $I->amOnPage('/help/index');+ $I->canSeeResponseCodeIs(200);+ $I->see('text');++ }++ /**+ * @param FunctionalTester $I+ */+ public function showFromCache(FunctionalTester $I)+ {+ $I->wantTo('show help for the index page from the cache.');+ $I->amOnPage('/help/index');+ $I->amOnPage('/help/index');+ $I->canSeeResponseCodeIs(200);+ $I->see('text');++ }++ /**+ * @param FunctionalTester $I+ */+ public function showHelpInvalidRoute(FunctionalTester $I)+ {+ $I->wantTo('show help for a non-existing route.');+ $I->amOnPage('/help/indexXXXX');+ $I->canSeeResponseCodeIs(200);+ $I->see('There is no help for this route');++ }++ /**+ * @param FunctionalTester $I+ */+ public function showHelpNoHelpFile(FunctionalTester $I)+ {+ $I->wantTo('show help for route that has no help file.');+ $I->amOnPage('/help/help.show');+ $I->canSeeResponseCodeIs(200);+ $I->see('text');++ }++}\ No newline at end of file