mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Also covered help.
This commit is contained in:
parent
441f011fba
commit
e62e0345df
@ -15,17 +15,13 @@ class Cleanup extends Command
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
// @codingStandardsIgnoreStart
|
||||
protected $description = 'Clean caches, regenerate some stuff.';
|
||||
// @codingStandardsIgnoreEnd
|
||||
/**
|
||||
* The console command name.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
// @codingStandardsIgnoreStart
|
||||
protected $name = 'firefly:cleanup';
|
||||
// @codingStandardsIgnoreEnd
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
76
tests/functional/HelpControllerCest.php
Normal file
76
tests/functional/HelpControllerCest.php
Normal file
@ -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' => 'thegrumpydictator@gmail.com', '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');
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user