Improve test coverage.

This commit is contained in:
James Cole
2018-12-18 19:57:23 +01:00
parent e46561347d
commit 3e71a103a2
12 changed files with 510 additions and 547 deletions

View File

@@ -86,32 +86,32 @@ use FireflyIII\TransactionRules\Triggers\UserAction;
*/
return [
'configuration' => [
'configuration' => [
'single_user_mode' => true,
'is_demo_site' => false,
],
'encryption' => null === env('USE_ENCRYPTION') || env('USE_ENCRYPTION') === true,
'version' => '4.7.9',
'api_version' => '0.9.0',
'db_version' => 6,
'maxUploadSize' => 15242880,
'send_error_message' => env('SEND_ERROR_MESSAGE', true),
'site_owner' => env('SITE_OWNER', ''),
'send_registration_mail' => env('SEND_REGISTRATION_MAIL', true),
'demo_username' => env('DEMO_USERNAME', ''),
'demo_password' => env('DEMO_PASSWORD', ''),
'is_sandstorm' => env('IS_SANDSTORM', 'unknown'),
'is_docker' => env('IS_DOCKER', 'unknown'),
'bunq_use_sandbox' => env('BUNQ_USE_SANDBOX', false),
'fixer_api_key' => env('FIXER_API_KEY', ''),
'mapbox_api_key' => env('MAPBOX_API_KEY', ''),
'trusted_proxies' => env('TRUSTED_PROXIES', ''),
'search_result_limit' => env('SEARCH_RESULT_LIMIT', 50),
'send_report_journals' => envNonEmpty('SEND_REPORT_JOURNALS', true),
'analytics_id' => env('ANALYTICS_ID', ''),
'disable_frame_header' => env('DISABLE_FRAME_HEADER', false),
'login_provider' => envNonEmpty('LOGIN_PROVIDER', 'eloquent'),
'allowedMimes' => [
'encryption' => null === env('USE_ENCRYPTION') || env('USE_ENCRYPTION') === true,
'version' => '4.7.9',
'api_version' => '0.9.0',
'db_version' => 6,
'maxUploadSize' => 15242880,
'send_error_message' => env('SEND_ERROR_MESSAGE', true),
'site_owner' => env('SITE_OWNER', ''),
'send_registration_mail' => env('SEND_REGISTRATION_MAIL', true),
'demo_username' => env('DEMO_USERNAME', ''),
'demo_password' => env('DEMO_PASSWORD', ''),
'is_sandstorm' => env('IS_SANDSTORM', 'unknown'),
'is_docker' => env('IS_DOCKER', 'unknown'),
'bunq_use_sandbox' => env('BUNQ_USE_SANDBOX', false),
'fixer_api_key' => env('FIXER_API_KEY', ''),
'mapbox_api_key' => env('MAPBOX_API_KEY', ''),
'trusted_proxies' => env('TRUSTED_PROXIES', ''),
'search_result_limit' => env('SEARCH_RESULT_LIMIT', 50),
'send_report_journals' => envNonEmpty('SEND_REPORT_JOURNALS', true),
'analytics_id' => env('ANALYTICS_ID', ''),
'disable_frame_header' => env('DISABLE_FRAME_HEADER', false),
'login_provider' => envNonEmpty('LOGIN_PROVIDER', 'eloquent'),
'allowedMimes' => [
/* plain files */
'text/plain',
@@ -173,18 +173,18 @@ return [
'application/vnd.oasis.opendocument.database',
'application/vnd.oasis.opendocument.image',
],
'list_length' => 10,
'export_formats' => [
'list_length' => 10,
'export_formats' => [
'csv' => CsvExporter::class,
],
'default_export_format' => 'csv',
'default_import_format' => 'csv',
'bill_periods' => ['weekly', 'monthly', 'quarterly', 'half-year', 'yearly'],
'accountRoles' => ['defaultAsset', 'sharedAsset', 'savingAsset', 'ccAsset', 'cashWalletAsset'],
'ccTypes' => [
'default_export_format' => 'csv',
'default_import_format' => 'csv',
'bill_periods' => ['weekly', 'monthly', 'quarterly', 'half-year', 'yearly'],
'accountRoles' => ['defaultAsset', 'sharedAsset', 'savingAsset', 'ccAsset', 'cashWalletAsset'],
'ccTypes' => [
'monthlyFull' => 'Full payment every month',
],
'range_to_repeat_freq' => [
'range_to_repeat_freq' => [
'1D' => 'weekly',
'1W' => 'weekly',
'1M' => 'monthly',
@@ -193,7 +193,7 @@ return [
'1Y' => 'yearly',
'custom' => 'custom',
],
'subTitlesByIdentifier' =>
'subTitlesByIdentifier' =>
[
'asset' => 'Asset accounts',
'expense' => 'Expense accounts',
@@ -202,7 +202,7 @@ return [
'liabilities' => 'Liabilities',
'liability' => 'Liabilities',
],
'subIconsByIdentifier' =>
'subIconsByIdentifier' =>
[
'asset' => 'fa-money',
'Asset account' => 'fa-money',
@@ -217,7 +217,7 @@ return [
'Import account' => 'fa-download',
'liabilities' => 'fa-ticket',
],
'accountTypesByIdentifier' =>
'accountTypesByIdentifier' =>
[
'asset' => ['Default account', 'Asset account'],
'expense' => ['Expense account', 'Beneficiary account'],
@@ -225,7 +225,7 @@ return [
'import' => ['Import account'],
'liabilities' => ['Loan', 'Debt', 'Credit card', 'Mortgage'],
],
'accountTypeByIdentifier' =>
'accountTypeByIdentifier' =>
[
'asset' => ['Asset account'],
'expense' => ['Expense account'],
@@ -237,7 +237,7 @@ return [
'liabilities' => ['Loan', 'Debt', 'Mortgage', 'Credit card'],
'liability' => ['Loan', 'Debt', 'Mortgage', 'Credit card'],
],
'shortNamesByFullName' =>
'shortNamesByFullName' =>
[
'Default account' => 'asset',
'Asset account' => 'asset',
@@ -251,7 +251,13 @@ return [
'Debt' => 'liabilities',
'Mortgage' => 'liabilities',
],
'languages' => [
'shortLiabilityNameByFullName' => [
'Credit card' => 'creditcard',
'Loan' => 'loan',
'Debt' => 'debt',
'Mortgage' => 'mortgage',
],
'languages' => [
// completed languages
'en_US' => ['name_locale' => 'English', 'name_english' => 'English'],
'es_ES' => ['name_locale' => 'Español', 'name_english' => 'Spanish'], // 2018-10-26: 96%
@@ -275,7 +281,7 @@ return [
//'sl_SI' => ['name_locale' => 'Slovenian', 'name_english' => 'Slovenian'], // 2018-10-26: 10%
//'uk_UA' => ['name_locale' => 'Ukranian', 'name_english' => 'Ukranian'], // 2018-10-26: 3%
],
'transactionTypesByWhat' => [
'transactionTypesByWhat' => [
'expenses' => ['Withdrawal'],
'withdrawal' => ['Withdrawal'],
'revenue' => ['Deposit'],
@@ -283,7 +289,7 @@ return [
'transfer' => ['Transfer'],
'transfers' => ['Transfer'],
],
'transactionIconsByWhat' => [
'transactionIconsByWhat' => [
'expenses' => 'fa-long-arrow-left',
'withdrawal' => 'fa-long-arrow-left',
'revenue' => 'fa-long-arrow-right',
@@ -292,7 +298,7 @@ return [
'transfers' => 'fa-exchange',
],
'bindables' => [
'bindables' => [
// models
'account' => \FireflyIII\Models\Account::class,
'attachment' => \FireflyIII\Models\Attachment::class,
@@ -345,7 +351,7 @@ return [
],
'rule-triggers' => [
'rule-triggers' => [
'user_action' => UserAction::class,
'from_account_starts' => FromAccountStarts::class,
'from_account_ends' => FromAccountEnds::class,
@@ -381,7 +387,7 @@ return [
'no_notes' => NotesEmpty::class,
'any_notes' => NotesAny::class,
],
'rule-actions' => [
'rule-actions' => [
'set_category' => SetCategory::class,
'clear_category' => ClearCategory::class,
'set_budget' => SetBudget::class,
@@ -403,7 +409,7 @@ return [
'convert_deposit' => ConvertToDeposit::class,
'convert_transfer' => ConvertToTransfer::class,
],
'context-rule-actions' => [
'context-rule-actions' => [
'set_category',
'set_budget',
'add_tag',
@@ -421,7 +427,7 @@ return [
'convert_deposit',
'convert_transfer',
],
'context-rule-triggers' => [
'context-rule-triggers' => [
'from_account_starts',
'from_account_ends',
'from_account_is',