Some new tests

This commit is contained in:
James Cole
2015-05-08 14:00:49 +02:00
parent 6802f04036
commit c06f18c815
7 changed files with 56 additions and 33 deletions

View File

@@ -39,17 +39,10 @@ class Amount
if (defined('FFCURRENCYSYMBOL')) {
return FFCURRENCYSYMBOL;
}
if (\Cache::has('FFCURRENCYSYMBOL')) {
define('FFCURRENCYSYMBOL', \Cache::get('FFCURRENCYSYMBOL'));
return FFCURRENCYSYMBOL;
}
$currencyPreference = Prefs::get('currencyPreference', 'EUR');
$currency = TransactionCurrency::whereCode($currencyPreference->data)->first();
\Cache::forever('FFCURRENCYSYMBOL', $currency->symbol);
define('FFCURRENCYSYMBOL', $currency->symbol);
return $currency->symbol;
@@ -160,7 +153,6 @@ class Amount
$currency = TransactionCurrency::whereCode($currencyPreference->data)->first();
if ($currency) {
Cache::forever('FFCURRENCYCODE', $currency->code);
define('FFCURRENCYCODE', $currency->code);
return $currency->code;