Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Move tests
James Cole895762ff18db
diff --git a/tests/Unit/Console/Commands/Correction/CreateAccessTokensTest.php b/tests/Feature/Console/Commands/Correction/CreateAccessTokensTest.phpsimilarity index 100%rename from tests/Unit/Console/Commands/Correction/CreateAccessTokensTest.phprename to tests/Feature/Console/Commands/Correction/CreateAccessTokensTest.phpdiff --git a/tests/Unit/Console/Commands/Correction/CreateLinkTypesTest.php b/tests/Feature/Console/Commands/Correction/CreateLinkTypesTest.phpsimilarity index 100%rename from tests/Unit/Console/Commands/Correction/CreateLinkTypesTest.phprename to tests/Feature/Console/Commands/Correction/CreateLinkTypesTest.phpdiff --git a/tests/Unit/Console/Commands/Correction/DeleteEmptyGroupsTest.php b/tests/Feature/Console/Commands/Correction/DeleteEmptyGroupsTest.phpsimilarity index 100%rename from tests/Unit/Console/Commands/Correction/DeleteEmptyGroupsTest.phprename to tests/Feature/Console/Commands/Correction/DeleteEmptyGroupsTest.phpdiff --git a/tests/Unit/Console/Commands/Correction/DeleteEmptyJournalsTest.php b/tests/Feature/Console/Commands/Correction/DeleteEmptyJournalsTest.phpsimilarity index 100%rename from tests/Unit/Console/Commands/Correction/DeleteEmptyJournalsTest.phprename to tests/Feature/Console/Commands/Correction/DeleteEmptyJournalsTest.phpdiff --git a/tests/Unit/Console/Commands/Correction/DeleteOrphanedTransactionsTest.php b/tests/Feature/Console/Commands/Correction/DeleteOrphanedTransactionsTest.phpsimilarity index 100%rename from tests/Unit/Console/Commands/Correction/DeleteOrphanedTransactionsTest.phprename to tests/Feature/Console/Commands/Correction/DeleteOrphanedTransactionsTest.phpdiff --git a/tests/Unit/Console/Commands/Correction/DeleteZeroAmountTest.php b/tests/Feature/Console/Commands/Correction/DeleteZeroAmountTest.phpsimilarity index 100%rename from tests/Unit/Console/Commands/Correction/DeleteZeroAmountTest.phprename to tests/Feature/Console/Commands/Correction/DeleteZeroAmountTest.phpdiff --git a/tests/Unit/Console/Commands/Correction/EnableCurrenciesTest.php b/tests/Feature/Console/Commands/Correction/EnableCurrenciesTest.phpsimilarity index 100%rename from tests/Unit/Console/Commands/Correction/EnableCurrenciesTest.phprename to tests/Feature/Console/Commands/Correction/EnableCurrenciesTest.phpdiff --git a/tests/Unit/Console/Commands/Correction/FixAccountTypesTest.php b/tests/Feature/Console/Commands/Correction/FixAccountTypesTest.phpsimilarity index 100%rename from tests/Unit/Console/Commands/Correction/FixAccountTypesTest.phprename to tests/Feature/Console/Commands/Correction/FixAccountTypesTest.phpdiff --git a/tests/Unit/Console/Commands/Correction/FixPiggiesTest.php b/tests/Feature/Console/Commands/Correction/FixPiggiesTest.phpsimilarity index 100%rename from tests/Unit/Console/Commands/Correction/FixPiggiesTest.phprename to tests/Feature/Console/Commands/Correction/FixPiggiesTest.phpdiff --git a/tests/Unit/Console/Commands/Correction/FixUnevenAmountTest.php b/tests/Feature/Console/Commands/Correction/FixUnevenAmountTest.phpsimilarity index 100%rename from tests/Unit/Console/Commands/Correction/FixUnevenAmountTest.phprename to tests/Feature/Console/Commands/Correction/FixUnevenAmountTest.phpdiff --git a/tests/Unit/Console/Commands/Correction/RemoveBillsTest.php b/tests/Feature/Console/Commands/Correction/RemoveBillsTest.phpsimilarity index 100%rename from tests/Unit/Console/Commands/Correction/RemoveBillsTest.phprename to tests/Feature/Console/Commands/Correction/RemoveBillsTest.phpdiff --git a/tests/Unit/Console/Commands/Correction/RenameMetaFieldsTest.php b/tests/Feature/Console/Commands/Correction/RenameMetaFieldsTest.phpsimilarity index 100%rename from tests/Unit/Console/Commands/Correction/RenameMetaFieldsTest.phprename to tests/Feature/Console/Commands/Correction/RenameMetaFieldsTest.phpdiff --git a/tests/Unit/Console/Commands/Correction/TransferBudgetsTest.php b/tests/Feature/Console/Commands/Correction/TransferBudgetsTest.phpsimilarity index 100%rename from tests/Unit/Console/Commands/Correction/TransferBudgetsTest.phprename to tests/Feature/Console/Commands/Correction/TransferBudgetsTest.phpdiff --git a/tests/Unit/Console/Commands/DecryptDatabaseTest.php b/tests/Feature/Console/Commands/DecryptDatabaseTest.phpsimilarity index 100%rename from tests/Unit/Console/Commands/DecryptDatabaseTest.phprename to tests/Feature/Console/Commands/DecryptDatabaseTest.phpdiff --git a/tests/Unit/Console/Commands/Integrity/ReportEmptyObjectsTest.php b/tests/Feature/Console/Commands/Integrity/ReportEmptyObjectsTest.phpsimilarity index 100%rename from tests/Unit/Console/Commands/Integrity/ReportEmptyObjectsTest.phprename to tests/Feature/Console/Commands/Integrity/ReportEmptyObjectsTest.phpdiff --git a/tests/Unit/Console/Commands/Integrity/ReportSumTest.php b/tests/Feature/Console/Commands/Integrity/ReportSumTest.phpsimilarity index 100%rename from tests/Unit/Console/Commands/Integrity/ReportSumTest.phprename to tests/Feature/Console/Commands/Integrity/ReportSumTest.phpdiff --git a/tests/Unit/Console/Commands/Tools/ApplyRulesTest.php b/tests/Feature/Console/Commands/Tools/ApplyRulesTest.phpsimilarity index 100%rename from tests/Unit/Console/Commands/Tools/ApplyRulesTest.phprename to tests/Feature/Console/Commands/Tools/ApplyRulesTest.phpdiff --git a/tests/Unit/Console/Commands/Upgrade/AccountCurrenciesTest.php b/tests/Feature/Console/Commands/Upgrade/AccountCurrenciesTest.phpsimilarity index 100%rename from tests/Unit/Console/Commands/Upgrade/AccountCurrenciesTest.phprename to tests/Feature/Console/Commands/Upgrade/AccountCurrenciesTest.phpdiff --git a/tests/Unit/Console/Commands/Upgrade/BackToJournalsTest.php b/tests/Feature/Console/Commands/Upgrade/BackToJournalsTest.phpsimilarity index 100%rename from tests/Unit/Console/Commands/Upgrade/BackToJournalsTest.phprename to tests/Feature/Console/Commands/Upgrade/BackToJournalsTest.phpdiff --git a/tests/Unit/Console/Commands/Upgrade/BudgetLimitCurrencyTest.php b/tests/Feature/Console/Commands/Upgrade/BudgetLimitCurrencyTest.phpsimilarity index 100%rename from tests/Unit/Console/Commands/Upgrade/BudgetLimitCurrencyTest.phprename to tests/Feature/Console/Commands/Upgrade/BudgetLimitCurrencyTest.phpdiff --git a/tests/Unit/Console/Commands/Upgrade/CCLiabilitiesTest.php b/tests/Feature/Console/Commands/Upgrade/CCLiabilitiesTest.phpsimilarity index 100%rename from tests/Unit/Console/Commands/Upgrade/CCLiabilitiesTest.phprename to tests/Feature/Console/Commands/Upgrade/CCLiabilitiesTest.phpdiff --git a/tests/Unit/Console/Commands/Upgrade/MigrateAttachmentsTest.php b/tests/Feature/Console/Commands/Upgrade/MigrateAttachmentsTest.phpsimilarity index 100%rename from tests/Unit/Console/Commands/Upgrade/MigrateAttachmentsTest.phprename to tests/Feature/Console/Commands/Upgrade/MigrateAttachmentsTest.phpdiff --git a/tests/Unit/Console/Commands/Upgrade/MigrateJournalNotesTest.php b/tests/Feature/Console/Commands/Upgrade/MigrateJournalNotesTest.phpsimilarity index 100%rename from tests/Unit/Console/Commands/Upgrade/MigrateJournalNotesTest.phprename to tests/Feature/Console/Commands/Upgrade/MigrateJournalNotesTest.phpdiff --git a/tests/Unit/Console/Commands/Upgrade/MigrateToGroupsTest.php b/tests/Feature/Console/Commands/Upgrade/MigrateToGroupsTest.phpsimilarity index 100%rename from tests/Unit/Console/Commands/Upgrade/MigrateToGroupsTest.phprename to tests/Feature/Console/Commands/Upgrade/MigrateToGroupsTest.phpdiff --git a/tests/Unit/Console/Commands/Upgrade/MigrateToRulesTest.php b/tests/Feature/Console/Commands/Upgrade/MigrateToRulesTest.phpsimilarity index 100%rename from tests/Unit/Console/Commands/Upgrade/MigrateToRulesTest.phprename to tests/Feature/Console/Commands/Upgrade/MigrateToRulesTest.phpdiff --git a/tests/Unit/Console/Commands/Upgrade/OtherCurrenciesCorrectionsTest.php b/tests/Feature/Console/Commands/Upgrade/OtherCurrenciesCorrectionsTest.phpsimilarity index 100%rename from tests/Unit/Console/Commands/Upgrade/OtherCurrenciesCorrectionsTest.phprename to tests/Feature/Console/Commands/Upgrade/OtherCurrenciesCorrectionsTest.phpdiff --git a/tests/Unit/Console/Commands/Upgrade/RenameAccountMetaTest.php b/tests/Feature/Console/Commands/Upgrade/RenameAccountMetaTest.phpsimilarity index 100%rename from tests/Unit/Console/Commands/Upgrade/RenameAccountMetaTest.phprename to tests/Feature/Console/Commands/Upgrade/RenameAccountMetaTest.phpdiff --git a/tests/Unit/Console/Commands/Upgrade/TransactionIdentifierTest.php b/tests/Feature/Console/Commands/Upgrade/TransactionIdentifierTest.phpsimilarity index 100%rename from tests/Unit/Console/Commands/Upgrade/TransactionIdentifierTest.phprename to tests/Feature/Console/Commands/Upgrade/TransactionIdentifierTest.phpdiff --git a/tests/Unit/Console/Commands/Upgrade/TransferCurrenciesCorrectionsTest.php b/tests/Feature/Console/Commands/Upgrade/TransferCurrenciesCorrectionsTest.phpsimilarity index 100%rename from tests/Unit/Console/Commands/Upgrade/TransferCurrenciesCorrectionsTest.phprename to tests/Feature/Console/Commands/Upgrade/TransferCurrenciesCorrectionsTest.phpdiff --git a/tests/Support/TestDataTrait.php b/tests/Support/TestDataTrait.phpdeleted file mode 100644index d6ef309a1d..0000000000--- a/tests/Support/TestDataTrait.php+++ /dev/null@@ -1,495 +0,0 @@-<?php-/**- * TestDataTrait.php- * Copyright (c) 2019 [email protected]- *- * This file is part of Firefly III (https://github.com/firefly-iii).- *- * This program is free software: you can redistribute it and/or modify- * it under the terms of the GNU Affero General Public License as- * published by the Free Software Foundation, either version 3 of the- * License, or (at your option) any later version.- *- * This program is distributed in the hope that it will be useful,- * but WITHOUT ANY WARRANTY; without even the implied warranty of- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the- * GNU Affero General Public License for more details.- *- * You should have received a copy of the GNU Affero General Public License- * along with this program. If not, see <https://www.gnu.org/licenses/>.- */--declare(strict_types=1);--namespace Tests\Support;--use Carbon\Carbon;-use Exception;-use FireflyIII\Models\TransactionCurrency;--/**- * Trait TestDataTrait- *- * @package Tests\Support- */-trait TestDataTrait-{- /**- * Method that returns default data for when the category OperationsRepos- * "listExpenses" method is called.- *- * @return array- */- protected function categoryListExpenses(): array- {- $eur = TransactionCurrency::where('code', 'EUR')->first();- $usd = TransactionCurrency::where('code', 'USD')->first();- $cat1 = $this->user()->categories()->inRandomOrder()->first();- $cat2 = $this->user()->categories()->inRandomOrder()->where('id', '!=', $cat1->id)->first();- $data = [];- $amount = 400;- $date = null;- try {- $amount = random_int(100, 2500);- $date = new Carbon;- } catch (Exception $e) {- $e->getMessage();- }- $amount = bcmul((string)round($amount / 100, 2), '-1');-- foreach ([$eur, $usd] as $currency) {- $data[$currency->id] = [- 'currency_id' => $currency->id,- 'currency_name' => $currency->name,- 'currency_symbol' => $currency->symbol,- 'currency_code' => $currency->code,- 'currency_decimal_places' => $currency->decimal_places,- 'categories' => [],- ];- foreach ([$cat1, $cat2] as $category) {- $data[$currency->id]['categories'][$category->id] = [- 'id' => $category->id,- 'name' => $category->name,- 'transaction_journals' => [],- ];- // add two random amounts:- for ($i = 0; $i < 2; $i++) {- $data[$currency->id]['categories'][$category->id]['transaction_journals'][$i] = [- 'amount' => $amount,- 'date' => $date,- ];- }- }- }-- return $data;- }-- /**- * Method that returns default data for when the tag OperationsRepos- * "listExpenses" method is called.- *- * @return array- */- protected function tagListExpenses(): array- {- $eur = TransactionCurrency::where('code', 'EUR')->first();- $usd = TransactionCurrency::where('code', 'USD')->first();- $tag1 = $this->user()->tags()->inRandomOrder()->first();- $tag2 = $this->user()->tags()->inRandomOrder()->where('id', '!=', $tag1->id)->first();- $data = [];- $amount = 400;- $date = null;- try {- $amount = random_int(100, 2500);- $date = new Carbon;- } catch (Exception $e) {- $e->getMessage();- }- $amount = bcmul((string)round($amount / 100, 2), '-1');-- foreach ([$eur, $usd] as $currency) {- $data[$currency->id] = [- 'currency_id' => $currency->id,- 'currency_name' => $currency->name,- 'currency_symbol' => $currency->symbol,- 'currency_code' => $currency->code,- 'currency_decimal_places' => $currency->decimal_places,- 'categories' => [],- ];- foreach ([$tag1, $tag2] as $tag) {- $data[$currency->id]['tags'][$tag->id] = [- 'id' => $tag->id,- 'name' => $tag->tag,- 'transaction_journals' => [],- ];- // add two random amounts:- for ($i = 0; $i < 2; $i++) {- $data[$currency->id]['categories'][$tag->id]['transaction_journals'][$i] = [- 'amount' => $amount,- 'date' => $date,- ];- }- }- }-- return $data;- }-- /**- * Method that returns default data for when the tag OperationsRepos- * "listIncome" method is called.- *- * @return array- */- protected function tagListIncome(): array- {- $eur = TransactionCurrency::where('code', 'EUR')->first();- $usd = TransactionCurrency::where('code', 'USD')->first();- $tag1 = $this->user()->tags()->inRandomOrder()->first();- $tag2 = $this->user()->tags()->inRandomOrder()->where('id', '!=', $tag1->id)->first();- $data = [];- $amount = 400;- $date = null;- try {- $amount = random_int(100, 2500);- $date = new Carbon;- } catch (Exception $e) {- $e->getMessage();- }- $amount = (string)round($amount / 100, 2);-- foreach ([$eur, $usd] as $currency) {- $data[$currency->id] = [- 'currency_id' => $currency->id,- 'currency_name' => $currency->name,- 'currency_symbol' => $currency->symbol,- 'currency_code' => $currency->code,- 'currency_decimal_places' => $currency->decimal_places,- 'categories' => [],- ];- foreach ([$tag1, $tag2] as $tag) {- $data[$currency->id]['tags'][$tag->id] = [- 'id' => $tag->id,- 'name' => $tag->tag,- 'transaction_journals' => [],- ];- // add two random amounts:- for ($i = 0; $i < 2; $i++) {- $data[$currency->id]['categories'][$tag->id]['transaction_journals'][$i] = [- 'amount' => $amount,- 'date' => $date,- ];- }- }- }-- return $data;- }-- /**- * Method that returns default data for when the category OperationsRepos- * "listExpenses" method is called.- *- * @return array- */- protected function budgetListExpenses(): array- {- $eur = TransactionCurrency::where('code', 'EUR')->first();- $usd = TransactionCurrency::where('code', 'USD')->first();- $bud1 = $this->user()->budgets()->inRandomOrder()->first();- $bud2 = $this->user()->budgets()->inRandomOrder()->where('id', '!=', $bud1->id)->first();- $data = [];- $amount = 400;- $date = null;- try {- $amount = random_int(100, 2500);- $date = new Carbon;- } catch (Exception $e) {- $e->getMessage();- }- $amount = bcmul((string)round($amount / 100, 2), '-1');-- foreach ([$eur, $usd] as $currency) {- $data[$currency->id] = [- 'currency_id' => $currency->id,- 'currency_name' => $currency->name,- 'currency_symbol' => $currency->symbol,- 'currency_code' => $currency->code,- 'currency_decimal_places' => $currency->decimal_places,- 'categories' => [],- ];- foreach ([$bud1, $bud2] as $budget) {- $data[$currency->id]['budgets'][$budget->id] = [- 'id' => $budget->id,- 'name' => $budget->name,- 'transaction_journals' => [],- ];- // add two random amounts:- for ($i = 0; $i < 2; $i++) {- $data[$currency->id]['budgets'][$budget->id]['transaction_journals'][$i] = [- 'amount' => $amount,- 'date' => $date,- ];- }- }- }-- return $data;- }-- /**- * Method that returns default data for when the category OperationsRepos- * "listExpenses" method is called.- *- * @return array- */- protected function categoryListIncome(): array- {- $eur = TransactionCurrency::where('code', 'EUR')->first();- $usd = TransactionCurrency::where('code', 'USD')->first();- $cat1 = $this->user()->categories()->inRandomOrder()->first();- $cat2 = $this->user()->categories()->inRandomOrder()->where('id', '!=', $cat1->id)->first();- $data = [];- $amount = 400;- $date = null;- try {- $amount = random_int(100, 2500);- $date = new Carbon;- } catch (Exception $e) {- $e->getMessage();- }- $amount = (string)round($amount / 100, 2);-- foreach ([$eur, $usd] as $currency) {- $data[$currency->id] = [- 'currency_id' => $currency->id,- 'currency_name' => $currency->name,- 'currency_symbol' => $currency->symbol,- 'currency_code' => $currency->code,- 'currency_decimal_places' => $currency->decimal_places,- 'categories' => [],- ];- foreach ([$cat1, $cat2] as $category) {- $data[$currency->id]['categories'][$category->id] = [- 'id' => $category->id,- 'name' => $category->name,- 'transaction_journals' => [],- ];- // add two random amounts:- for ($i = 0; $i < 2; $i++) {- $data[$currency->id]['categories'][$category->id]['transaction_journals'][$i] = [- 'amount' => $amount,- 'date' => $date,- ];- }- }- }-- return $data;- }-- /**- * Method that returns default data for when the category OperationsController- * "sumExpenses" method is called.- *- * Also applies to NoCategoryRepos::sumExpenses.- *- * @return array- */- protected function categorySumExpenses(): array- {- $eur = TransactionCurrency::where('code', 'EUR')->first();- $usd = TransactionCurrency::where('code', 'USD')->first();- $data = [];- $amount = 400;- try {- $amount = random_int(100, 2500);- } catch (Exception $e) {- $e->getMessage();- }- $amount = bcmul((string)round($amount / 100, 2), '-1');-- foreach ([$eur, $usd] as $currency) {- $data[$currency->id] = [- 'currency_id' => $currency->id,- 'currency_name' => $currency->name,- 'currency_symbol' => $currency->symbol,- 'currency_code' => $currency->code,- 'currency_decimal_places' => $currency->decimal_places,- 'sum' => $amount,- ];- }-- return $data;- }-- /**- * Method that returns default data for when the budget OperationsController- * "sumExpenses" method is called.- *- * Also works for NoBudgetRepos::sumExpenses- *- * @return array- */- protected function budgetSumExpenses(): array- {- $eur = TransactionCurrency::where('code', 'EUR')->first();- $usd = TransactionCurrency::where('code', 'USD')->first();- $data = [];- $amount = 400;- try {- $amount = random_int(100, 2500);- } catch (Exception $e) {- $e->getMessage();- }- $amount = bcmul((string)round($amount / 100, 2), '-1');-- foreach ([$eur, $usd] as $currency) {- $data[$currency->id] = [- 'currency_id' => $currency->id,- 'currency_name' => $currency->name,- 'currency_symbol' => $currency->symbol,- 'currency_code' => $currency->code,- 'currency_decimal_places' => $currency->decimal_places,- 'sum' => $amount,- ];- }-- return $data;- }-- /**- * Method that returns default data for when the category OperationsController- * "sumIncome" method is called.- *- * Also applies to NoCategoryRepos::sumIncome.- *- * @return array- */- protected function categorySumIncome(): array- {- $eur = TransactionCurrency::where('code', 'EUR')->first();- $usd = TransactionCurrency::where('code', 'USD')->first();- $data = [];- $amount = 400;- try {- $amount = random_int(100, 2500);- } catch (Exception $e) {- $e->getMessage();- }- $amount = (string)round($amount / 100, 2);-- foreach ([$eur, $usd] as $currency) {- $data[$currency->id] = [- 'currency_id' => $currency->id,- 'currency_name' => $currency->name,- 'currency_symbol' => $currency->symbol,- 'currency_code' => $currency->code,- 'currency_decimal_places' => $currency->decimal_places,- 'sum' => $amount,- ];- }-- return $data;- }-- /**- * Method that returns default data for when the category NoCategoryRepos- * "listExpenses" method is called.- *- * @return array- */- protected function noCategoryListExpenses(): array- {- $eur = TransactionCurrency::where('code', 'EUR')->first();- $usd = TransactionCurrency::where('code', 'USD')->first();- $data = [];- $amount = 400;- $date = null;- try {- $amount = random_int(100, 2500);- $date = new Carbon;- } catch (Exception $e) {- $e->getMessage();- }- $amount = bcmul((string)round($amount / 100, 2), '-1');-- foreach ([$eur, $usd] as $currency) {- $data[$currency->id] = [- 'currency_id' => $currency->id,- 'currency_name' => $currency->name,- 'currency_symbol' => $currency->symbol,- 'currency_code' => $currency->code,- 'currency_decimal_places' => $currency->decimal_places,- 'categories' => [- 0 => [- 'id' => 0,- 'name' => 'no cat',- 'transaction_journals' => [],- ],- ],- ];-- // add two random amounts:- for ($i = 0; $i < 2; $i++) {- $data[$currency->id]['categories'][0]['transaction_journals'][$i] = [- 'amount' => $amount,- 'date' => $date,- ];- }- }-- return $data;- }-- /**- * Method that returns default data for when the category NoCategoryRepos- * "listExpenses" method is called.- *- * @return array- */- protected function noCategoryListIncome(): array- {- $eur = TransactionCurrency::where('code', 'EUR')->first();- $usd = TransactionCurrency::where('code', 'USD')->first();- $data = [];- $amount = 400;- $date = null;- try {- $amount = random_int(100, 2500);- $date = new Carbon;- } catch (Exception $e) {- $e->getMessage();- }- $amount = (string)round($amount / 100, 2);-- foreach ([$eur, $usd] as $currency) {- $data[$currency->id] = [- 'currency_id' => $currency->id,- 'currency_name' => $currency->name,- 'currency_symbol' => $currency->symbol,- 'currency_code' => $currency->code,- 'currency_decimal_places' => $currency->decimal_places,- 'categories' => [- 0 => [- 'id' => 0,- 'name' => 'no cat',- 'transaction_journals' => [],- ],- ],- ];-- // add two random amounts:- for ($i = 0; $i < 2; $i++) {- $data[$currency->id]['categories'][0]['transaction_journals'][$i] = [- 'amount' => $amount,- 'date' => $date,- ];- }- }-- return $data;- }--}diff --git a/tests/Support/AmountTest.php b/tests/Unit/Support/AmountTest.phpsimilarity index 100%rename from tests/Support/AmountTest.phprename to tests/Unit/Support/AmountTest.php