Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Update test code.
James Cole4d6bc5572381
diff --git a/tests/Api/V1/Controllers/AboutControllerTest.php b/tests/Api/V1/Controllers/AboutControllerTest.phpindex 68740c65fb..d3ffcb88e0 100644--- a/tests/Api/V1/Controllers/AboutControllerTest.php+++ b/tests/Api/V1/Controllers/AboutControllerTest.php@@ -48,7 +48,7 @@ class AboutControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\AboutController::__construct* @covers \FireflyIII\Api\V1\Controllers\AboutController::about*/- public function testAbout()+ public function testAbout(): void{// test API$response = $this->get('/api/v1/about');@@ -67,7 +67,7 @@ class AboutControllerTest extends TestCase** @covers \FireflyIII\Api\V1\Controllers\AboutController::user*/- public function testUser()+ public function testUser(): void{// test API$response = $this->get('/api/v1/about/user');diff --git a/tests/Api/V1/Controllers/AccountControllerTest.php b/tests/Api/V1/Controllers/AccountControllerTest.phpindex e6c024b7dc..77586a0008 100644--- a/tests/Api/V1/Controllers/AccountControllerTest.php+++ b/tests/Api/V1/Controllers/AccountControllerTest.php@@ -52,7 +52,7 @@ class AccountControllerTest extends TestCase** @covers \FireflyIII\Api\V1\Controllers\AccountController::delete*/- public function testDelete()+ public function testDelete(): void{// mock stuff:$repository = $this->mock(AccountRepositoryInterface::class);@@ -76,7 +76,7 @@ class AccountControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\AccountController::index* @covers \FireflyIII\Api\V1\Controllers\AccountController::mapTypes*/- public function testIndex()+ public function testIndex(): void{// create stuff$accounts = factory(Account::class, 10)->create();@@ -115,7 +115,7 @@ class AccountControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Requests\AccountRequest::rules* @covers \FireflyIII\Api\V1\Requests\AccountRequest::getAll*/- public function testInvalidBalance()+ public function testInvalidBalance(): void{// mock repositories$repository = $this->mock(AccountRepositoryInterface::class);@@ -157,7 +157,7 @@ class AccountControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Requests\AccountRequest::rules* @covers \FireflyIII\Api\V1\Requests\AccountRequest::getAll*/- public function testNoCreditCardData()+ public function testNoCreditCardData(): void{// mock repositories$repository = $this->mock(AccountRepositoryInterface::class);@@ -199,7 +199,7 @@ class AccountControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Requests\AccountRequest::rules* @covers \FireflyIII\Api\V1\Requests\AccountRequest::getAll*/- public function testNoCurrencyInfo()+ public function testNoCurrencyInfo(): void{// mock repositories$repository = $this->mock(AccountRepositoryInterface::class);@@ -236,7 +236,7 @@ class AccountControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\AccountController::show*/- public function testShow()+ public function testShow(): void{// create stuff$account = $this->user()->accounts()->first();@@ -273,7 +273,7 @@ class AccountControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Requests\AccountRequest::rules* @covers \FireflyIII\Api\V1\Requests\AccountRequest::getAll*/- public function testStoreNotUnique()+ public function testStoreNotUnique(): void{// mock repositories$repository = $this->mock(AccountRepositoryInterface::class);@@ -315,7 +315,7 @@ class AccountControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Requests\AccountRequest::rules* @covers \FireflyIII\Api\V1\Requests\AccountRequest::getAll*/- public function testStoreValid()+ public function testStoreValid(): void{// mock repositories$repository = $this->mock(AccountRepositoryInterface::class);@@ -359,7 +359,7 @@ class AccountControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Requests\AccountRequest::rules* @covers \FireflyIII\Api\V1\Requests\AccountRequest::getAll*/- public function testStoreWithCurrencyCode()+ public function testStoreWithCurrencyCode(): void{// mock repositories$repository = $this->mock(AccountRepositoryInterface::class);@@ -405,7 +405,7 @@ class AccountControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\AccountController::update* @covers \FireflyIII\Api\V1\Requests\AccountRequest::rules*/- public function testUpdate()+ public function testUpdate(): void{// mock repositories$repository = $this->mock(AccountRepositoryInterface::class);@@ -448,7 +448,7 @@ class AccountControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\AccountController::update* @covers \FireflyIII\Api\V1\Requests\AccountRequest::rules*/- public function testUpdateCurrencyCode()+ public function testUpdateCurrencyCode(): void{// mock repositories$repository = $this->mock(AccountRepositoryInterface::class);diff --git a/tests/Api/V1/Controllers/BillControllerTest.php b/tests/Api/V1/Controllers/BillControllerTest.phpindex 7ea81bfc1a..76ab361ee3 100644--- a/tests/Api/V1/Controllers/BillControllerTest.php+++ b/tests/Api/V1/Controllers/BillControllerTest.php@@ -52,7 +52,7 @@ class BillControllerTest extends TestCase** @covers \FireflyIII\Api\V1\Controllers\BillController*/- public function testDelete()+ public function testDelete(): void{// mock stuff:$repository = $this->mock(BillRepositoryInterface::class);@@ -73,7 +73,7 @@ class BillControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\BillController::__construct* @covers \FireflyIII\Api\V1\Controllers\BillController::index*/- public function testIndex()+ public function testIndex(): void{// create stuff$bills = factory(Bill::class, 10)->create();@@ -99,7 +99,7 @@ class BillControllerTest extends TestCase/*** @covers \FireflyIII\Api\V1\Controllers\BillController::show*/- public function testShow()+ public function testShow(): void{// create stuff$bill = $this->user()->bills()->first();@@ -127,7 +127,7 @@ class BillControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Requests\BillRequest::getAll* @covers \FireflyIII\Api\V1\Requests\BillRequest::withValidator*/- public function testStoreMinOverMax()+ public function testStoreMinOverMax(): void{// create stuff$bill = $this->user()->bills()->first();@@ -172,7 +172,7 @@ class BillControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Requests\BillRequest::authorize* @covers \FireflyIII\Api\V1\Requests\BillRequest::getAll*/- public function testStoreValid()+ public function testStoreValid(): void{// create stuff$bill = $this->user()->bills()->first();@@ -211,7 +211,7 @@ class BillControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Requests\BillRequest::authorize* @covers \FireflyIII\Api\V1\Requests\BillRequest::getAll*/- public function testUpdateValid()+ public function testUpdateValid(): void{// create stuff$bill = $this->user()->bills()->first();diff --git a/tests/Api/V1/Controllers/TransactionControllerTest.php b/tests/Api/V1/Controllers/TransactionControllerTest.phpindex db4174b1b2..d4646cd950 100644--- a/tests/Api/V1/Controllers/TransactionControllerTest.php+++ b/tests/Api/V1/Controllers/TransactionControllerTest.php@@ -24,6 +24,7 @@ declare(strict_types=1);namespace Tests\Api\V1\Controllers;+use FireflyIII\Exceptions\FireflyException;use FireflyIII\Helpers\Collector\JournalCollector;use FireflyIII\Helpers\Collector\JournalCollectorInterface;use FireflyIII\Helpers\Filter\NegativeAmountFilter;@@ -57,7 +58,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::__construct* @covers \FireflyIII\Api\V1\Controllers\TransactionController::delete*/- public function testDelete()+ public function testDelete(): void{// mock stuff:$repository = $this->mock(JournalRepositoryInterface::class);@@ -81,7 +82,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testFailCurrencyCode()+ public function testFailCurrencyCode(): void{// mock stuff:$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -128,7 +129,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testFailCurrencyId()+ public function testFailCurrencyId(): void{// mock stuff:$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -174,7 +175,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testFailEmptyDescriptions()+ public function testFailEmptyDescriptions(): void{// mock stuff:$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -226,7 +227,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testFailEmptySplitDescriptions()+ public function testFailEmptySplitDescriptions(): void{// mock stuff:$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -284,7 +285,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Requests\TransactionRequest* @covers \FireflyIII\Rules\BelongsUser*/- public function testFailExpenseID()+ public function testFailExpenseID(): void{// mock stuff:$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -332,7 +333,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testFailExpenseName()+ public function testFailExpenseName(): void{// mock stuff:$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -379,7 +380,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testFailNoAsset()+ public function testFailNoAsset(): void{// mock stuff:$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -423,7 +424,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testFailNoData()+ public function testFailNoData(): void{// mock stuff:$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -460,7 +461,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testFailNoForeignCurrencyInfo()+ public function testFailNoForeignCurrencyInfo(): void{// mock stuff:$account = $this->user()->accounts()->where('account_type_id', 3)->first();@@ -508,7 +509,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testFailOpposingRevenueID()+ public function testFailOpposingRevenueID(): void{$account = $this->user()->accounts()->where('account_type_id', 3)->first();$opposing = $this->user()->accounts()->where('account_type_id', 5)->first();@@ -561,7 +562,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Requests\TransactionRequest* @covers \FireflyiII\Rules\BelongsUser*/- public function testFailOwnershipBillId()+ public function testFailOwnershipBillId(): void{$account = $this->user()->accounts()->where('account_type_id', 3)->first();$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -620,7 +621,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Requests\TransactionRequest* @covers \FireflyiII\Rules\BelongsUser*/- public function testFailOwnershipBillName()+ public function testFailOwnershipBillName(): void{$account = $this->user()->accounts()->where('account_type_id', 3)->first();$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -678,7 +679,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Requests\TransactionRequest* @covers \FireflyiII\Rules\BelongsUser*/- public function testFailOwnershipBudgetId()+ public function testFailOwnershipBudgetId(): void{$account = $this->user()->accounts()->where('account_type_id', 3)->first();$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -736,7 +737,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Requests\TransactionRequest* @covers \FireflyiII\Rules\BelongsUser*/- public function testFailOwnershipBudgetName()+ public function testFailOwnershipBudgetName(): void{$account = $this->user()->accounts()->where('account_type_id', 3)->first();$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -794,7 +795,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Requests\TransactionRequest* @covers \FireflyiII\Rules\BelongsUser*/- public function testFailOwnershipCategoryId()+ public function testFailOwnershipCategoryId(): void{$account = $this->user()->accounts()->where('account_type_id', 3)->first();$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -852,7 +853,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Requests\TransactionRequest* @covers \FireflyiII\Rules\BelongsUser*/- public function testFailOwnershipPiggyBankID()+ public function testFailOwnershipPiggyBankID(): void{// move account to other user$move = $this->user()->accounts()->where('account_type_id', 3)->first();@@ -918,7 +919,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Requests\TransactionRequest* @covers \FireflyiII\Rules\BelongsUser*/- public function testFailOwnershipPiggyBankName()+ public function testFailOwnershipPiggyBankName(): void{// move account to other user$move = $this->user()->accounts()->where('account_type_id', 3)->first();@@ -984,7 +985,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Requests\TransactionRequest* @covers \FireflyIII\Rules\BelongsUser*/- public function testFailRevenueID()+ public function testFailRevenueID(): void{$account = $this->user()->accounts()->where('account_type_id', 4)->first();$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -1030,7 +1031,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testFailSplitDeposit()+ public function testFailSplitDeposit(): void{$account = $this->user()->accounts()->where('account_type_id', 3)->first();$second = $this->user()->accounts()->where('account_type_id', 3)->where('id', '!=', $account->id)->first();@@ -1087,7 +1088,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testFailSplitTransfer()+ public function testFailSplitTransfer(): void{$account = $this->user()->accounts()->where('account_type_id', 3)->first();$second = $this->user()->accounts()->where('account_type_id', 3)->where('id', '!=', $account->id)->first();@@ -1151,7 +1152,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testFailSplitWithdrawal()+ public function testFailSplitWithdrawal(): void{$account = $this->user()->accounts()->where('account_type_id', 3)->first();$second = $this->user()->accounts()->where('account_type_id', 3)->where('id', '!=', $account->id)->first();@@ -1210,7 +1211,7 @@ class TransactionControllerTest extends TestCase** throws \FireflyIII\Exceptions\FireflyException*/- public function testIndex()+ public function testIndex(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$accountRepos->shouldReceive('setUser');@@ -1223,7 +1224,11 @@ class TransactionControllerTest extends TestCase$collector->withOpposingAccount()->withCategoryInformation()->withBudgetInformation();$collector->setAllAssetAccounts();$collector->setLimit(5)->setPage(1);- $paginator = $collector->getPaginatedJournals();+ try {+ $paginator = $collector->getPaginatedJournals();+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }// mock stuff:$repository = $this->mock(JournalRepositoryInterface::class);@@ -1260,7 +1265,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::mapTypes* throws \FireflyIII\Exceptions\FireflyException*/- public function testIndexWithRange()+ public function testIndexWithRange(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$accountRepos->shouldReceive('setUser');@@ -1273,7 +1278,11 @@ class TransactionControllerTest extends TestCase$collector->withOpposingAccount()->withCategoryInformation()->withBudgetInformation();$collector->setAllAssetAccounts();$collector->setLimit(5)->setPage(1);+ try {$paginator = $collector->getPaginatedJournals();+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }// mock stuff:$repository = $this->mock(JournalRepositoryInterface::class);@@ -1321,7 +1330,7 @@ class TransactionControllerTest extends TestCase/*** @covers \FireflyIII\Api\V1\Controllers\TransactionController::show*/- public function testShowDeposit()+ public function testShowDeposit(): void{do {// this is kind of cheating but OK.@@ -1382,7 +1391,7 @@ class TransactionControllerTest extends TestCase/*** @covers \FireflyIII\Api\V1\Controllers\TransactionController::show*/- public function testShowWithdrawal()+ public function testShowWithdrawal(): void{do {// this is kind of cheating but OK.@@ -1450,7 +1459,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testSuccessBillId()+ public function testSuccessBillId(): void{// default journal:$journal = $this->user()->transactionJournals()->first();@@ -1491,7 +1500,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testSuccessBillName()+ public function testSuccessBillName(): void{// default journal:$journal = $this->user()->transactionJournals()->first();@@ -1532,7 +1541,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testSuccessNewStoreOpposingName()+ public function testSuccessNewStoreOpposingName(): void{$journal = $this->user()->transactionJournals()->where('transaction_type_id', 1)->first();$account = $this->user()->accounts()->where('account_type_id', 3)->first();@@ -1572,7 +1581,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testSuccessStoreAccountName()+ public function testSuccessStoreAccountName(): void{// default journal:$journal = $this->user()->transactionJournals()->first();@@ -1611,7 +1620,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testSuccessStoreBasic()+ public function testSuccessStoreBasic(): void{// default journal:$journal = $this->user()->transactionJournals()->where('transaction_type_id', 1)->first();@@ -1650,7 +1659,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testSuccessStoreBasicByName()+ public function testSuccessStoreBasicByName(): void{// default journal:$journal = $this->user()->transactionJournals()->where('transaction_type_id', 1)->first();@@ -1691,7 +1700,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testSuccessStoreBasicDeposit()+ public function testSuccessStoreBasicDeposit(): void{// default journal:$journal = $this->user()->transactionJournals()->where('transaction_type_id', 2)->first();@@ -1730,7 +1739,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testSuccessStoreBudgetId()+ public function testSuccessStoreBudgetId(): void{$budget = $this->user()->budgets()->first();$journal = $this->user()->transactionJournals()->first();@@ -1769,7 +1778,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testSuccessStoreBudgetName()+ public function testSuccessStoreBudgetName(): void{$budget = $this->user()->budgets()->first();$journal = $this->user()->transactionJournals()->first();@@ -1809,7 +1818,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testSuccessStoreCategoryID()+ public function testSuccessStoreCategoryID(): void{$category = $this->user()->categories()->first();$journal = $this->user()->transactionJournals()->first();@@ -1848,7 +1857,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testSuccessStoreCategoryName()+ public function testSuccessStoreCategoryName(): void{$category = $this->user()->categories()->first();$journal = $this->user()->transactionJournals()->first();@@ -1887,7 +1896,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testSuccessStoreForeignAmount()+ public function testSuccessStoreForeignAmount(): void{$currency = TransactionCurrency::first();$foreign = TransactionCurrency::where('id', '!=', $currency->id)->first();@@ -1928,7 +1937,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testSuccessStoreMetaData()+ public function testSuccessStoreMetaData(): void{$journal = $this->user()->transactionJournals()->first();$account = $this->user()->accounts()->where('account_type_id', 3)->first();@@ -1973,7 +1982,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testSuccessStoreNewCategoryName()+ public function testSuccessStoreNewCategoryName(): void{$journal = $this->user()->transactionJournals()->first();$account = $this->user()->accounts()->where('account_type_id', 3)->first();@@ -2013,7 +2022,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testSuccessStoreNewOpposingName()+ public function testSuccessStoreNewOpposingName(): void{$journal = $this->user()->transactionJournals()->first();$account = $this->user()->accounts()->where('account_type_id', 3)->first();@@ -2053,7 +2062,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testSuccessStoreNotes()+ public function testSuccessStoreNotes(): void{$journal = $this->user()->transactionJournals()->first();$account = $this->user()->accounts()->where('account_type_id', 3)->first();@@ -2092,7 +2101,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testSuccessStoreOpposingID()+ public function testSuccessStoreOpposingID(): void{$opposing = $this->user()->accounts()->where('account_type_id', 4)->first();$journal = $this->user()->transactionJournals()->first();@@ -2131,7 +2140,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testSuccessStoreOpposingName()+ public function testSuccessStoreOpposingName(): void{$opposing = $this->user()->accounts()->where('account_type_id', 4)->first();$journal = $this->user()->transactionJournals()->first();@@ -2172,7 +2181,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testSuccessStorePiggyDeposit()+ public function testSuccessStorePiggyDeposit(): void{$journal = $this->user()->transactionJournals()->first();$account = $this->user()->accounts()->where('account_type_id', 3)->first();@@ -2211,7 +2220,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testSuccessStorePiggyId()+ public function testSuccessStorePiggyId(): void{$source = $this->user()->accounts()->where('account_type_id', 3)->first();$dest = $this->user()->accounts()->where('account_type_id', 3)->where('id', '!=', $source->id)->first();@@ -2251,7 +2260,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testSuccessStorePiggyName()+ public function testSuccessStorePiggyName(): void{$source = $this->user()->accounts()->where('account_type_id', 3)->first();$dest = $this->user()->accounts()->where('account_type_id', 3)->where('id', '!=', $source->id)->first();@@ -2290,7 +2299,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testSuccessStoreReconciled()+ public function testSuccessStoreReconciled(): void{$journal = $this->user()->transactionJournals()->first();$account = $this->user()->accounts()->where('account_type_id', 3)->first();@@ -2328,7 +2337,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testSuccessStoreSplit()+ public function testSuccessStoreSplit(): void{$journal = $this->user()->transactionJournals()->first();$account = $this->user()->accounts()->where('account_type_id', 3)->first();@@ -2375,7 +2384,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::store* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testSuccessStoreTags()+ public function testSuccessStoreTags(): void{$tags = ['TagOne' . random_int(1, 1000),@@ -2419,7 +2428,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::update* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testUpdateBasicDeposit()+ public function testUpdateBasicDeposit(): void{$account = $this->user()->accounts()->where('account_type_id', 3)->first();$repository = $this->mock(JournalRepositoryInterface::class);@@ -2460,7 +2469,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\TransactionController::update* @covers \FireflyIII\Api\V1\Requests\TransactionRequest*/- public function testUpdateBasicWithdrawal()+ public function testUpdateBasicWithdrawal(): void{$account = $this->user()->accounts()->where('account_type_id', 3)->first();$repository = $this->mock(JournalRepositoryInterface::class);diff --git a/tests/Api/V1/Controllers/UserControllerTest.php b/tests/Api/V1/Controllers/UserControllerTest.phpindex 3fd0e2a69d..7db9ea3925 100644--- a/tests/Api/V1/Controllers/UserControllerTest.php+++ b/tests/Api/V1/Controllers/UserControllerTest.php@@ -54,7 +54,7 @@ class UserControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\UserController::delete* @covers \FireflyIII\Api\V1\Requests\UserRequest*/- public function testDelete()+ public function testDelete(): void{// create a user first:$user = User::create(['email' => 'some@newu' . random_int(1, 1000) . 'ser.nl', 'password' => 'hello', 'blocked' => 0]);@@ -72,7 +72,7 @@ class UserControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\UserController::delete* @covers \FireflyIII\Api\V1\Requests\UserRequest*/- public function testDeleteNoAdmin()+ public function testDeleteNoAdmin(): void{Passport::actingAs($this->emptyUser());@@ -89,7 +89,7 @@ class UserControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\UserController::__construct* @covers \FireflyIII\Api\V1\Controllers\UserController::index*/- public function testIndex()+ public function testIndex(): void{// create stuff$users = factory(User::class, 10)->create();@@ -113,7 +113,7 @@ class UserControllerTest extends TestCase/*** @covers \FireflyIII\Api\V1\Controllers\UserController::show*/- public function testShow()+ public function testShow(): void{$user = User::first();@@ -127,7 +127,7 @@ class UserControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\UserController::store* @covers \FireflyIII\Api\V1\Requests\UserRequest*/- public function testStoreBasic()+ public function testStoreBasic(): void{$data = ['email' => 'some_new@user' . random_int(1, 1000) . '.com',@@ -148,7 +148,7 @@ class UserControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\UserController::store* @covers \FireflyIII\Api\V1\Requests\UserRequest*/- public function testStoreNotUnique()+ public function testStoreNotUnique(): void{$data = ['email' => $this->user()->email,@@ -177,7 +177,7 @@ class UserControllerTest extends TestCase* @covers \FireflyIII\Api\V1\Controllers\UserController::update* @covers \FireflyIII\Api\V1\Requests\UserRequest*/- public function testUpdate()+ public function testUpdate(): void{// create a user first:$user = User::create(['email' => 'some@newu' . random_int(1, 1000) . 'ser.nl', 'password' => 'hello', 'blocked' => 0]);diff --git a/tests/CreatesApplication.php b/tests/CreatesApplication.phpindex ee73d4b36a..712aeec11c 100644--- a/tests/CreatesApplication.php+++ b/tests/CreatesApplication.php@@ -36,7 +36,7 @@ trait CreatesApplication** @return \Illuminate\Foundation\Application*/- public function createApplication()+ public function createApplication(): \Illuminate\Foundation\Application{$app = require __DIR__ . '/../bootstrap/app.php';diff --git a/tests/Feature/Controllers/Account/ReconcileControllerTest.php b/tests/Feature/Controllers/Account/ReconcileControllerTest.phpindex ccdfe0bd25..f549fb9a2e 100644--- a/tests/Feature/Controllers/Account/ReconcileControllerTest.php+++ b/tests/Feature/Controllers/Account/ReconcileControllerTest.php@@ -56,7 +56,7 @@ class ReconcileControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Account\ReconcileController::edit*/- public function testEdit()+ public function testEdit(): void{$repository = $this->mock(JournalRepositoryInterface::class);$journal = $this->user()->transactionJournals()->where('transaction_type_id', 5)->first();@@ -78,7 +78,7 @@ class ReconcileControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Account\ReconcileController::edit*/- public function testEditRedirect()+ public function testEditRedirect(): void{$journal = $this->user()->transactionJournals()->where('transaction_type_id', '!=', 5)->first();$this->be($this->user());@@ -90,7 +90,7 @@ class ReconcileControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Account\ReconcileController::overview()*/- public function testOverview()+ public function testOverview(): void{$transactions = $this->user()->transactions()->inRandomOrder()->take(3)->get();$repository = $this->mock(JournalRepositoryInterface::class);@@ -112,7 +112,7 @@ class ReconcileControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Account\ReconcileController::overview()* @expectedExceptionMessage is not an asset account*/- public function testOverviewNotAsset()+ public function testOverviewNotAsset(): void{$account = $this->user()->accounts()->where('account_type_id', '!=', 3)->first();$parameters = [@@ -131,7 +131,7 @@ class ReconcileControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Account\ReconcileController::reconcile()* @covers \FireflyIII\Http\Controllers\Account\ReconcileController::redirectToOriginalAccount()*/- public function testReconcile()+ public function testReconcile(): void{$repository = $this->mock(CurrencyRepositoryInterface::class);$repository->shouldReceive('findNull')->once()->andReturn(TransactionCurrency::find(1));@@ -148,7 +148,7 @@ class ReconcileControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Account\ReconcileController::reconcile()* @covers \FireflyIII\Http\Controllers\Account\ReconcileController::redirectToOriginalAccount()*/- public function testReconcileInitialBalance()+ public function testReconcileInitialBalance(): void{$transaction = Transaction::leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id')->where('accounts.user_id', $this->user()->id)->where('accounts.account_type_id', 6)->first(['account_id']);@@ -162,7 +162,7 @@ class ReconcileControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Account\ReconcileController::reconcile()* @covers \FireflyIII\Http\Controllers\Account\ReconcileController::redirectToOriginalAccount()*/- public function testReconcileNoDates()+ public function testReconcileNoDates(): void{$repository = $this->mock(CurrencyRepositoryInterface::class);$repository->shouldReceive('findNull')->once()->andReturn(TransactionCurrency::find(1));@@ -180,7 +180,7 @@ class ReconcileControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Account\ReconcileController::reconcile()* @covers \FireflyIII\Http\Controllers\Account\ReconcileController::redirectToOriginalAccount()*/- public function testReconcileNoEndDate()+ public function testReconcileNoEndDate(): void{$repository = $this->mock(CurrencyRepositoryInterface::class);$repository->shouldReceive('findNull')->once()->andReturn(TransactionCurrency::find(1));@@ -198,7 +198,7 @@ class ReconcileControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Account\ReconcileController::reconcile()* @covers \FireflyIII\Http\Controllers\Account\ReconcileController::redirectToOriginalAccount()*/- public function testReconcileNotAsset()+ public function testReconcileNotAsset(): void{$account = $this->user()->accounts()->where('account_type_id', '!=', 6)->where('account_type_id', '!=', 3)->first();$this->be($this->user());@@ -209,7 +209,7 @@ class ReconcileControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Account\ReconcileController::show()*/- public function testShow()+ public function testShow(): void{$journal = $this->user()->transactionJournals()->where('transaction_type_id', 5)->first();$repository = $this->mock(JournalRepositoryInterface::class);@@ -227,7 +227,7 @@ class ReconcileControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Account\ReconcileController::show()*/- public function testShowSomethingElse()+ public function testShowSomethingElse(): void{$journal = $this->user()->transactionJournals()->where('transaction_type_id', '!=', 5)->first();$this->be($this->user());@@ -240,7 +240,7 @@ class ReconcileControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Account\ReconcileController::submit()* @covers \FireflyIII\Http\Requests\ReconciliationStoreRequest*/- public function testSubmit()+ public function testSubmit(): void{$repository = $this->mock(AccountRepositoryInterface::class);$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -268,7 +268,7 @@ class ReconcileControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Account\ReconcileController::transactions()*/- public function testTransactions()+ public function testTransactions(): void{$repository = $this->mock(CurrencyRepositoryInterface::class);$repository->shouldReceive('findNull')->once()->andReturn(TransactionCurrency::find(1));@@ -281,7 +281,7 @@ class ReconcileControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Account\ReconcileController::transactions()*/- public function testTransactionsInitialBalance()+ public function testTransactionsInitialBalance(): void{$transaction = Transaction::leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id')->where('accounts.user_id', $this->user()->id)->where('accounts.account_type_id', 6)->first(['account_id']);@@ -294,7 +294,7 @@ class ReconcileControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Account\ReconcileController::update* @covers \FireflyIII\Http\Requests\ReconciliationUpdateRequest*/- public function testUpdate()+ public function testUpdate(): void{$journalRepos = $this->mock(JournalRepositoryInterface::class);$journalRepos->shouldReceive('firstNull')->andReturn(new TransactionJournal);@@ -317,7 +317,7 @@ class ReconcileControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Account\ReconcileController::update* @covers \FireflyIII\Http\Requests\ReconciliationUpdateRequest*/- public function testUpdateNotReconcile()+ public function testUpdateNotReconcile(): void{$journal = $this->user()->transactionJournals()->where('transaction_type_id', '!=', 5)->first();$data = [@@ -334,7 +334,7 @@ class ReconcileControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Account\ReconcileController::update* @covers \FireflyIII\Http\Requests\ReconciliationUpdateRequest*/- public function testUpdateZero()+ public function testUpdateZero(): void{$journal = $this->user()->transactionJournals()->where('transaction_type_id', 5)->first();$data = [diff --git a/tests/Feature/Controllers/AccountControllerTest.php b/tests/Feature/Controllers/AccountControllerTest.phpindex 4357050385..290a766cc6 100644--- a/tests/Feature/Controllers/AccountControllerTest.php+++ b/tests/Feature/Controllers/AccountControllerTest.php@@ -64,7 +64,7 @@ class AccountControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\AccountController::create*/- public function testCreate()+ public function testCreate(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -84,7 +84,7 @@ class AccountControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\AccountController::delete* @covers \FireflyIII\Http\Controllers\Controller::rememberPreviousUri*/- public function testDelete()+ public function testDelete(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -106,7 +106,7 @@ class AccountControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Controller::__construct* @covers \FireflyIII\Http\Controllers\Controller::getPreviousUri*/- public function testDestroy()+ public function testDestroy(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -128,7 +128,7 @@ class AccountControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\AccountController::edit*/- public function testEdit()+ public function testEdit(): void{$note = new Note();$note->text = 'This is a test';@@ -168,7 +168,7 @@ class AccountControllerTest extends TestCase* @param string $range**/- public function testIndex(string $range)+ public function testIndex(string $range): void{// mock stuff$account = factory(Account::class)->make();@@ -199,7 +199,7 @@ class AccountControllerTest extends TestCase** @param string $range*/- public function testShow(string $range)+ public function testShow(string $range): void{$date = new Carbon;$this->session(['start' => $date, 'end' => clone $date]);@@ -243,7 +243,7 @@ class AccountControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\AccountController::show* @expectedExceptionMessage End is after start!*/- public function testShowBrokenBadDates()+ public function testShowBrokenBadDates(): void{// mock$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -262,7 +262,7 @@ class AccountControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\AccountController::redirectToOriginalAccount* @expectedExceptionMessage Expected a transaction*/- public function testShowBrokenInitial()+ public function testShowBrokenInitial(): void{// mock$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -283,7 +283,7 @@ class AccountControllerTest extends TestCase** @param string $range*/- public function testShowByDateEmpty(string $range)+ public function testShowByDateEmpty(string $range): void{// mock stuff$collector = $this->mock(JournalCollectorInterface::class);@@ -318,7 +318,7 @@ class AccountControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\AccountController::show* @covers \FireflyIII\Http\Controllers\AccountController::redirectToOriginalAccount*/- public function testShowInitial()+ public function testShowInitial(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -339,7 +339,7 @@ class AccountControllerTest extends TestCase* @covers \FireflyIII\Http\Requests\AccountFormRequest* @covers \FireflyIII\Http\Controllers\Controller::getPreviousUri*/- public function testStore()+ public function testStore(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -368,7 +368,7 @@ class AccountControllerTest extends TestCase* @covers \FireflyIII\Http\Requests\AccountFormRequest* @covers \FireflyIII\Http\Controllers\Controller::getPreviousUri*/- public function testStoreAnother()+ public function testStoreAnother(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -395,7 +395,7 @@ class AccountControllerTest extends TestCase* @covers \FireflyIII\Http\Requests\AccountFormRequest* @covers \FireflyIII\Http\Controllers\Controller::getPreviousUri*/- public function testUpdate()+ public function testUpdate(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -422,7 +422,7 @@ class AccountControllerTest extends TestCase* @covers \FireflyIII\Http\Requests\AccountFormRequest* @covers \FireflyIII\Http\Controllers\Controller::getPreviousUri*/- public function testUpdateAgain()+ public function testUpdateAgain(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);diff --git a/tests/Feature/Controllers/Admin/ConfigurationControllerTest.php b/tests/Feature/Controllers/Admin/ConfigurationControllerTest.phpindex ad63174d66..0c2364dc6a 100644--- a/tests/Feature/Controllers/Admin/ConfigurationControllerTest.php+++ b/tests/Feature/Controllers/Admin/ConfigurationControllerTest.php@@ -49,7 +49,7 @@ class ConfigurationControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Admin\ConfigurationController::index* @covers \FireflyIII\Http\Controllers\Admin\ConfigurationController::__construct*/- public function testIndex()+ public function testIndex(): void{$this->be($this->user());@@ -72,7 +72,7 @@ class ConfigurationControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Admin\ConfigurationController::postIndex*/- public function testPostIndex()+ public function testPostIndex(): void{$falseConfig = new Configuration;$falseConfig->data = false;diff --git a/tests/Feature/Controllers/Admin/HomeControllerTest.php b/tests/Feature/Controllers/Admin/HomeControllerTest.phpindex 74f94d125b..9d02ab892e 100644--- a/tests/Feature/Controllers/Admin/HomeControllerTest.php+++ b/tests/Feature/Controllers/Admin/HomeControllerTest.php@@ -49,7 +49,7 @@ class HomeControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Admin\HomeController::index* @covers \FireflyIII\Http\Controllers\Admin\HomeController::__construct*/- public function testIndex()+ public function testIndex(): void{$this->be($this->user());$response = $this->get(route('admin.index'));@@ -58,7 +58,7 @@ class HomeControllerTest extends TestCase$response->assertSee('<ol class="breadcrumb">');}- public function testTestMessage()+ public function testTestMessage(): void{Event::fake();diff --git a/tests/Feature/Controllers/Admin/LinkControllerTest.php b/tests/Feature/Controllers/Admin/LinkControllerTest.phpindex 7cb7a1d2ee..045cf02340 100644--- a/tests/Feature/Controllers/Admin/LinkControllerTest.php+++ b/tests/Feature/Controllers/Admin/LinkControllerTest.php@@ -50,7 +50,7 @@ class LinkControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Admin\LinkController::__construct* @covers \FireflyIII\Http\Controllers\Admin\LinkController::create*/- public function testCreate()+ public function testCreate(): void{$this->be($this->user());@@ -61,7 +61,7 @@ class LinkControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Admin\LinkController::delete*/- public function testDeleteEditable()+ public function testDeleteEditable(): void{$repository = $this->mock(LinkTypeRepositoryInterface::class);// create editable link type just in case:@@ -78,7 +78,7 @@ class LinkControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Admin\LinkController::delete*/- public function testDeleteNonEditable()+ public function testDeleteNonEditable(): void{$repository = $this->mock(LinkTypeRepositoryInterface::class);$linkType = LinkType::where('editable', 0)->first();@@ -91,7 +91,7 @@ class LinkControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Admin\LinkController::destroy*/- public function testDestroy()+ public function testDestroy(): void{$repository = $this->mock(LinkTypeRepositoryInterface::class);@@ -111,7 +111,7 @@ class LinkControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Admin\LinkController::edit*/- public function testEditEditable()+ public function testEditEditable(): void{// create editable link type just in case:LinkType::create(['editable' => 1, 'inward' => 'hello Y', 'outward' => 'bye Y', 'name' => 'Test type Y']);@@ -125,7 +125,7 @@ class LinkControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Admin\LinkController::edit*/- public function testEditNonEditable()+ public function testEditNonEditable(): void{$linkType = LinkType::where('editable', 0)->first();$this->be($this->user());@@ -137,7 +137,7 @@ class LinkControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Admin\LinkController::index*/- public function testIndex()+ public function testIndex(): void{$linkTypes = LinkType::inRandomOrder()->take(3)->get();$repository = $this->mock(LinkTypeRepositoryInterface::class);@@ -151,7 +151,7 @@ class LinkControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Admin\LinkController::show*/- public function testShow()+ public function testShow(): void{$linkType = LinkType::first();$this->be($this->user());@@ -163,7 +163,7 @@ class LinkControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Admin\LinkController::store* @covers \FireflyIII\Http\Requests\LinkTypeFormRequest*/- public function testStore()+ public function testStore(): void{$repository = $this->mock(LinkTypeRepositoryInterface::class);$data = [@@ -185,7 +185,7 @@ class LinkControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Admin\LinkController::store* @covers \FireflyIII\Http\Requests\LinkTypeFormRequest*/- public function testStoreRedirect()+ public function testStoreRedirect(): void{$repository = $this->mock(LinkTypeRepositoryInterface::class);$data = [@@ -206,7 +206,7 @@ class LinkControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Admin\LinkController::update* @covers \FireflyIII\Http\Requests\LinkTypeFormRequest*/- public function testUpdate()+ public function testUpdate(): void{$repository = $this->mock(LinkTypeRepositoryInterface::class);@@ -230,7 +230,7 @@ class LinkControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Admin\LinkController::update* @covers \FireflyIII\Http\Requests\LinkTypeFormRequest*/- public function testUpdateNonEditable()+ public function testUpdateNonEditable(): void{$repository = $this->mock(LinkTypeRepositoryInterface::class);$linkType = LinkType::where('editable', 0)->first();@@ -252,7 +252,7 @@ class LinkControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Admin\LinkController::update* @covers \FireflyIII\Http\Requests\LinkTypeFormRequest*/- public function testUpdateRedirect()+ public function testUpdateRedirect(): void{$repository = $this->mock(LinkTypeRepositoryInterface::class);// create editable link type just in case:diff --git a/tests/Feature/Controllers/Admin/UpdateControllerTest.php b/tests/Feature/Controllers/Admin/UpdateControllerTest.phpindex 0f91b2f1bf..4bc08784c2 100644--- a/tests/Feature/Controllers/Admin/UpdateControllerTest.php+++ b/tests/Feature/Controllers/Admin/UpdateControllerTest.php@@ -54,7 +54,7 @@ class UpdateControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Admin\UpdateController::index* @covers \FireflyIII\Http\Controllers\Admin\UpdateController::__construct*/- public function testIndex()+ public function testIndex(): void{$this->be($this->user());@@ -77,7 +77,7 @@ class UpdateControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Admin\UpdateController::post*/- public function testPost()+ public function testPost(): void{$falseConfig = new Configuration;$falseConfig->data = false;@@ -95,7 +95,7 @@ class UpdateControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Admin\UpdateController::updateCheck*/- public function testUpdateCheck()+ public function testUpdateCheck(): void{$falseConfig = new Configuration;$falseConfig->data = false;@@ -124,7 +124,7 @@ class UpdateControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Admin\UpdateController::updateCheck*/- public function testUpdateCheckCurrent()+ public function testUpdateCheckCurrent(): void{$falseConfig = new Configuration;$falseConfig->data = false;@@ -151,7 +151,7 @@ class UpdateControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Admin\UpdateController::updateCheck*/- public function testUpdateCheckError()+ public function testUpdateCheckError(): void{$falseConfig = new Configuration;$falseConfig->data = false;@@ -174,7 +174,7 @@ class UpdateControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Admin\UpdateController::updateCheck*/- public function testUpdateCheckNewer()+ public function testUpdateCheckNewer(): void{$falseConfig = new Configuration;$falseConfig->data = false;diff --git a/tests/Feature/Controllers/Admin/UserControllerTest.php b/tests/Feature/Controllers/Admin/UserControllerTest.phpindex 9a26fb2e64..36c1bb35d2 100644--- a/tests/Feature/Controllers/Admin/UserControllerTest.php+++ b/tests/Feature/Controllers/Admin/UserControllerTest.php@@ -48,7 +48,7 @@ class UserControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Admin\UserController::delete*/- public function testDelete()+ public function testDelete(): void{$this->be($this->user());$response = $this->get(route('admin.users.delete', [1]));@@ -60,7 +60,7 @@ class UserControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Admin\UserController::destroy*/- public function testDestroy()+ public function testDestroy(): void{$repository = $this->mock(UserRepositoryInterface::class);$repository->shouldReceive('destroy')->once();@@ -73,7 +73,7 @@ class UserControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Admin\UserController::edit*/- public function testEdit()+ public function testEdit(): void{$this->be($this->user());$response = $this->get(route('admin.users.edit', [1]));@@ -86,7 +86,7 @@ class UserControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Admin\UserController::index* @covers \FireflyIII\Http\Controllers\Admin\UserController::__construct*/- public function testIndex()+ public function testIndex(): void{$repository = $this->mock(UserRepositoryInterface::class);$user = $this->user();@@ -102,7 +102,7 @@ class UserControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Admin\UserController::show*/- public function testShow()+ public function testShow(): void{$repository = $this->mock(UserRepositoryInterface::class);$repository->shouldReceive('getUserData')->andReturn(@@ -123,7 +123,7 @@ class UserControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Admin\UserController::update*/- public function testUpdate()+ public function testUpdate(): void{$repository = $this->mock(UserRepositoryInterface::class);$repository->shouldReceive('changePassword')->once();diff --git a/tests/Feature/Controllers/AttachmentControllerTest.php b/tests/Feature/Controllers/AttachmentControllerTest.phpindex 117f0d6e2d..d8f149031d 100644--- a/tests/Feature/Controllers/AttachmentControllerTest.php+++ b/tests/Feature/Controllers/AttachmentControllerTest.php@@ -50,7 +50,7 @@ class AttachmentControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\AttachmentController::delete*/- public function testDelete()+ public function testDelete(): void{// mock stuff$attachRepository = $this->mock(AttachmentRepositoryInterface::class);@@ -66,7 +66,7 @@ class AttachmentControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\AttachmentController::destroy*/- public function testDestroy()+ public function testDestroy(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -84,7 +84,7 @@ class AttachmentControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\AttachmentController::download*/- public function testDownload()+ public function testDownload(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -104,7 +104,7 @@ class AttachmentControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\AttachmentController::download* @expectedExceptionMessage Could not find the indicated attachment*/- public function testDownloadFail()+ public function testDownloadFail(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -120,7 +120,7 @@ class AttachmentControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\AttachmentController::edit*/- public function testEdit()+ public function testEdit(): void{$attachRepository = $this->mock(AttachmentRepositoryInterface::class);$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -136,7 +136,7 @@ class AttachmentControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\AttachmentController::update*/- public function testUpdate()+ public function testUpdate(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -161,7 +161,7 @@ class AttachmentControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\AttachmentController::view* @covers \FireflyIII\Http\Controllers\AttachmentController::__construct*/- public function testView()+ public function testView(): void{$repository = $this->mock(AttachmentRepositoryInterface::class);$repository->shouldReceive('exists')->once()->andReturn(true);@@ -178,7 +178,7 @@ class AttachmentControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\AttachmentController::view* @covers \FireflyIII\Http\Controllers\AttachmentController::__construct*/- public function testViewFail()+ public function testViewFail(): void{$repository = $this->mock(AttachmentRepositoryInterface::class);$repository->shouldReceive('exists')->once()->andReturn(false);diff --git a/tests/Feature/Controllers/Auth/ForgotPasswordControllerTest.php b/tests/Feature/Controllers/Auth/ForgotPasswordControllerTest.phpindex d4b03348ad..c12dc98fbc 100644--- a/tests/Feature/Controllers/Auth/ForgotPasswordControllerTest.php+++ b/tests/Feature/Controllers/Auth/ForgotPasswordControllerTest.php@@ -48,7 +48,7 @@ class ForgotPasswordControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Auth\ForgotPasswordController::__construct* @covers \FireflyIII\Http\Controllers\Auth\ForgotPasswordController::sendResetLinkEmail*/- public function testSendResetLinkEmail()+ public function testSendResetLinkEmail(): void{$repository = $this->mock(UserRepositoryInterface::class);@@ -65,7 +65,7 @@ class ForgotPasswordControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Auth\ForgotPasswordController::__construct* @covers \FireflyIII\Http\Controllers\Auth\ForgotPasswordController::sendResetLinkEmail*/- public function testSendResetLinkEmailDemo()+ public function testSendResetLinkEmailDemo(): void{$repository = $this->mock(UserRepositoryInterface::class);$repository->shouldReceive('hasRole')->andReturn(true)->once();diff --git a/tests/Feature/Controllers/Auth/TwoFactorControllerTest.php b/tests/Feature/Controllers/Auth/TwoFactorControllerTest.phpindex 32863de11f..3caa680ce0 100644--- a/tests/Feature/Controllers/Auth/TwoFactorControllerTest.php+++ b/tests/Feature/Controllers/Auth/TwoFactorControllerTest.php@@ -49,7 +49,7 @@ class TwoFactorControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Auth\TwoFactorController::index*/- public function testIndex()+ public function testIndex(): void{$this->be($this->user());@@ -72,7 +72,7 @@ class TwoFactorControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Auth\TwoFactorController::index*/- public function testIndexNo2FA()+ public function testIndexNo2FA(): void{$this->be($this->user());@@ -95,7 +95,7 @@ class TwoFactorControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Auth\TwoFactorController::index* @expectedExceptionMessage Your two factor authentication secret is empty*/- public function testIndexNoSecret()+ public function testIndexNoSecret(): void{$this->be($this->user());@@ -118,7 +118,7 @@ class TwoFactorControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Auth\TwoFactorController::lostTwoFactor*/- public function testLostTwoFactor()+ public function testLostTwoFactor(): void{$this->be($this->user());@@ -141,7 +141,7 @@ class TwoFactorControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Auth\TwoFactorController::postIndex*/- public function testPostIndex()+ public function testPostIndex(): void{$data = ['code' => '123456'];Google2FA::shouldReceive('verifyKey')->andReturn(true)->once();diff --git a/tests/Feature/Controllers/BillControllerTest.php b/tests/Feature/Controllers/BillControllerTest.phpindex 3fe1dc4562..887ea957bb 100644--- a/tests/Feature/Controllers/BillControllerTest.php+++ b/tests/Feature/Controllers/BillControllerTest.php@@ -57,7 +57,7 @@ class BillControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\BillController::create*/- public function testCreate()+ public function testCreate(): void{// mock stuff$attachHelper = $this->mock(AttachmentHelperInterface::class);@@ -74,7 +74,7 @@ class BillControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\BillController::delete*/- public function testDelete()+ public function testDelete(): void{// mock stuff$attachHelper = $this->mock(AttachmentHelperInterface::class);@@ -91,7 +91,7 @@ class BillControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\BillController::destroy*/- public function testDestroy()+ public function testDestroy(): void{// mock stuff$attachHelper = $this->mock(AttachmentHelperInterface::class);@@ -110,7 +110,7 @@ class BillControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\BillController::edit*/- public function testEdit()+ public function testEdit(): void{// mock stuff$attachHelper = $this->mock(AttachmentHelperInterface::class);@@ -128,7 +128,7 @@ class BillControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\BillController::index* @covers \FireflyIII\Http\Controllers\BillController::__construct*/- public function testIndex()+ public function testIndex(): void{// mock stuff$attachHelper = $this->mock(AttachmentHelperInterface::class);@@ -153,7 +153,7 @@ class BillControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\BillController::rescan*/- public function testRescan()+ public function testRescan(): void{// mock stuff$attachHelper = $this->mock(AttachmentHelperInterface::class);@@ -171,7 +171,7 @@ class BillControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\BillController::rescan*/- public function testRescanInactive()+ public function testRescanInactive(): void{// mock stuff$attachHelper = $this->mock(AttachmentHelperInterface::class);@@ -188,7 +188,7 @@ class BillControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\BillController::show*/- public function testShow()+ public function testShow(): void{// mock stuff$attachHelper = $this->mock(AttachmentHelperInterface::class);@@ -223,7 +223,7 @@ class BillControllerTest extends TestCase* @covers \FireflyIII\Http\Requests\BillFormRequest* @covers \FireflyIII\Http\Requests\Request*/- public function testStore()+ public function testStore(): void{// mock stuff$attachHelper = $this->mock(AttachmentHelperInterface::class);@@ -256,7 +256,7 @@ class BillControllerTest extends TestCase* @covers \FireflyIII\Http\Requests\BillFormRequest* @covers \FireflyIII\Http\Requests\Request*/- public function testUpdate()+ public function testUpdate(): void{// mock stuff$attachHelper = $this->mock(AttachmentHelperInterface::class);diff --git a/tests/Feature/Controllers/BudgetControllerTest.php b/tests/Feature/Controllers/BudgetControllerTest.phpindex b509ac69bb..69b8ca0960 100644--- a/tests/Feature/Controllers/BudgetControllerTest.php+++ b/tests/Feature/Controllers/BudgetControllerTest.php@@ -57,7 +57,7 @@ class BudgetControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\BudgetController::amount*/- public function testAmount()+ public function testAmount(): void{// mock stuff$repository = $this->mock(BudgetRepositoryInterface::class);@@ -77,7 +77,7 @@ class BudgetControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\BudgetController::amount*/- public function testAmountZero()+ public function testAmountZero(): void{// mock stuff$repository = $this->mock(BudgetRepositoryInterface::class);@@ -96,7 +96,7 @@ class BudgetControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\BudgetController::create*/- public function testCreate()+ public function testCreate(): void{// mock stuff$repository = $this->mock(BudgetRepositoryInterface::class);@@ -113,7 +113,7 @@ class BudgetControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\BudgetController::delete*/- public function testDelete()+ public function testDelete(): void{// mock stuff$repository = $this->mock(BudgetRepositoryInterface::class);@@ -130,7 +130,7 @@ class BudgetControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\BudgetController::destroy*/- public function testDestroy()+ public function testDestroy(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -149,7 +149,7 @@ class BudgetControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\BudgetController::edit*/- public function testEdit()+ public function testEdit(): void{// mock stuff$repository = $this->mock(BudgetRepositoryInterface::class);@@ -170,7 +170,7 @@ class BudgetControllerTest extends TestCase** @param string $range*/- public function testIndex(string $range)+ public function testIndex(string $range): void{// mock stuff$budget = factory(Budget::class)->make();@@ -216,7 +216,7 @@ class BudgetControllerTest extends TestCase** @param string $range*/- public function testIndexWithDate(string $range)+ public function testIndexWithDate(string $range): void{// mock stuff$budget = factory(Budget::class)->make();@@ -262,7 +262,7 @@ class BudgetControllerTest extends TestCase** @param string $range*/- public function testIndexWithInvalidDate(string $range)+ public function testIndexWithInvalidDate(string $range): void{// mock stuff$budget = factory(Budget::class)->make();@@ -304,7 +304,7 @@ class BudgetControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\BudgetController::infoIncome*/- public function testInfoIncome()+ public function testInfoIncome(): void{// mock stuff$accountRepos = $this->mock(AccountRepositoryInterface::class);@@ -325,7 +325,7 @@ class BudgetControllerTest extends TestCase** @param string $range*/- public function testInfoIncomeExpanded(string $range)+ public function testInfoIncomeExpanded(string $range): void{// mock stuff$accountRepos = $this->mock(AccountRepositoryInterface::class);@@ -348,7 +348,7 @@ class BudgetControllerTest extends TestCase* @param string $range**/- public function testNoBudget(string $range)+ public function testNoBudget(string $range): void{// mock stuff$repository = $this->mock(BudgetRepositoryInterface::class);@@ -383,7 +383,7 @@ class BudgetControllerTest extends TestCase** @param string $range*/- public function testNoBudgetAll(string $range)+ public function testNoBudgetAll(string $range): void{// mock stuff$repository = $this->mock(BudgetRepositoryInterface::class);@@ -420,7 +420,7 @@ class BudgetControllerTest extends TestCase** @param string $range*/- public function testNoBudgetDate(string $range)+ public function testNoBudgetDate(string $range): void{// mock stuff$repository = $this->mock(BudgetRepositoryInterface::class);@@ -452,7 +452,7 @@ class BudgetControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\BudgetController::postUpdateIncome*/- public function testPostUpdateIncome()+ public function testPostUpdateIncome(): void{// mock stuff$repository = $this->mock(BudgetRepositoryInterface::class);@@ -474,7 +474,7 @@ class BudgetControllerTest extends TestCase** @param string $range*/- public function testShow(string $range)+ public function testShow(string $range): void{// mock stuff@@ -514,7 +514,7 @@ class BudgetControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\BudgetController::showByBudgetLimit* @expectedExceptionMessage This budget limit is not part of*/- public function testShowByBadBudgetLimit()+ public function testShowByBadBudgetLimit(): void{// mock stuff$repository = $this->mock(BudgetRepositoryInterface::class);@@ -532,7 +532,7 @@ class BudgetControllerTest extends TestCase** @param string $range*/- public function testShowByBudgetLimit(string $range)+ public function testShowByBudgetLimit(string $range): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -568,7 +568,7 @@ class BudgetControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\BudgetController::store*/- public function testStore()+ public function testStore(): void{// mock stuff$budget = factory(Budget::class)->make();@@ -593,7 +593,7 @@ class BudgetControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\BudgetController::update*/- public function testUpdate()+ public function testUpdate(): void{// mock stuff$budget = factory(Budget::class)->make();@@ -619,7 +619,7 @@ class BudgetControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\BudgetController::updateIncome*/- public function testUpdateIncome()+ public function testUpdateIncome(): void{// must be in list$this->be($this->user());diff --git a/tests/Feature/Controllers/CategoryControllerTest.php b/tests/Feature/Controllers/CategoryControllerTest.phpindex 11f2218bbb..2b04f30012 100644--- a/tests/Feature/Controllers/CategoryControllerTest.php+++ b/tests/Feature/Controllers/CategoryControllerTest.php@@ -58,7 +58,7 @@ class CategoryControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\CategoryController::create*/- public function testCreate()+ public function testCreate(): void{// mock stuff$categoryRepos = $this->mock(CategoryRepositoryInterface::class);@@ -76,7 +76,7 @@ class CategoryControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\CategoryController::delete*/- public function testDelete()+ public function testDelete(): void{// mock stuff$categoryRepos = $this->mock(CategoryRepositoryInterface::class);@@ -94,7 +94,7 @@ class CategoryControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\CategoryController::destroy*/- public function testDestroy()+ public function testDestroy(): void{// mock stuff$categoryRepos = $this->mock(CategoryRepositoryInterface::class);@@ -114,7 +114,7 @@ class CategoryControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\CategoryController::edit*/- public function testEdit()+ public function testEdit(): void{// mock stuff$categoryRepos = $this->mock(CategoryRepositoryInterface::class);@@ -133,7 +133,7 @@ class CategoryControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\CategoryController::index* @covers \FireflyIII\Http\Controllers\CategoryController::__construct*/- public function testIndex()+ public function testIndex(): void{// mock stuff$category = factory(Category::class)->make();@@ -158,7 +158,7 @@ class CategoryControllerTest extends TestCase** @param string $range*/- public function testNoCategory(string $range)+ public function testNoCategory(string $range): void{// mock stuff$collector = $this->mock(JournalCollectorInterface::class);@@ -195,7 +195,7 @@ class CategoryControllerTest extends TestCase* @param string $range**/- public function testNoCategoryAll(string $range)+ public function testNoCategoryAll(string $range): void{// mock stuff$collector = $this->mock(JournalCollectorInterface::class);@@ -231,7 +231,7 @@ class CategoryControllerTest extends TestCase** @param string $range*/- public function testNoCategoryDate(string $range)+ public function testNoCategoryDate(string $range): void{// mock stuff$collector = $this->mock(JournalCollectorInterface::class);@@ -275,7 +275,7 @@ class CategoryControllerTest extends TestCase** @param string $range*/- public function testShow(string $range)+ public function testShow(string $range): void{$transaction = factory(Transaction::class)->make();$categoryRepos = $this->mock(CategoryRepositoryInterface::class);@@ -324,7 +324,7 @@ class CategoryControllerTest extends TestCase** @param string $range*/- public function testShowAll(string $range)+ public function testShowAll(string $range): void{// mock stuff$transaction = factory(Transaction::class)->make();@@ -362,7 +362,7 @@ class CategoryControllerTest extends TestCase** @param string $range*/- public function testShowByDate(string $range)+ public function testShowByDate(string $range): void{// mock stuff$transaction = factory(Transaction::class)->make();@@ -407,7 +407,7 @@ class CategoryControllerTest extends TestCase** @param string $range*/- public function testShowEmpty(string $range)+ public function testShowEmpty(string $range): void{$journalRepos = $this->mock(JournalRepositoryInterface::class);$journalRepos->shouldReceive('firstNull')->twice()->andReturn(TransactionJournal::first());@@ -446,7 +446,7 @@ class CategoryControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\CategoryController::store* @covers \FireflyIII\Http\Requests\CategoryFormRequest*/- public function testStore()+ public function testStore(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$repository = $this->mock(CategoryRepositoryInterface::class);@@ -470,7 +470,7 @@ class CategoryControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\CategoryController::update* @covers \FireflyIII\Http\Requests\CategoryFormRequest*/- public function testUpdate()+ public function testUpdate(): void{$category = Category::first();$repository = $this->mock(CategoryRepositoryInterface::class);diff --git a/tests/Feature/Controllers/Chart/AccountControllerTest.php b/tests/Feature/Controllers/Chart/AccountControllerTest.phpindex 0a199b7e47..082706ce69 100644--- a/tests/Feature/Controllers/Chart/AccountControllerTest.php+++ b/tests/Feature/Controllers/Chart/AccountControllerTest.php@@ -66,7 +66,7 @@ class AccountControllerTest extends TestCase** @param string $range*/- public function testExpenseAccounts(string $range)+ public function testExpenseAccounts(string $range): void{$account = factory(Account::class)->make();$generator = $this->mock(GeneratorInterface::class);@@ -90,7 +90,7 @@ class AccountControllerTest extends TestCase** @param string $range*/- public function testExpenseBudget(string $range)+ public function testExpenseBudget(string $range): void{$generator = $this->mock(GeneratorInterface::class);$collector = $this->mock(JournalCollectorInterface::class);@@ -118,7 +118,7 @@ class AccountControllerTest extends TestCase** @param string $range*/- public function testExpenseBudgetAll(string $range)+ public function testExpenseBudgetAll(string $range): void{$generator = $this->mock(GeneratorInterface::class);$collector = $this->mock(JournalCollectorInterface::class);@@ -148,7 +148,7 @@ class AccountControllerTest extends TestCase** @param string $range*/- public function testExpenseCategory(string $range)+ public function testExpenseCategory(string $range): void{$transaction = factory(Transaction::class)->make();$category = factory(Category::class)->make();@@ -177,7 +177,7 @@ class AccountControllerTest extends TestCase** @param string $range*/- public function testExpenseCategoryAll(string $range)+ public function testExpenseCategoryAll(string $range): void{$transaction = factory(Transaction::class)->make();$category = factory(Category::class)->make();@@ -210,7 +210,7 @@ class AccountControllerTest extends TestCase** @param string $range*/- public function testFrontpage(string $range)+ public function testFrontpage(string $range): void{$generator = $this->mock(GeneratorInterface::class);$accountRepos = $this->mock(AccountRepositoryInterface::class);@@ -237,7 +237,7 @@ class AccountControllerTest extends TestCase** @param string $range*/- public function testIncomeCategory(string $range)+ public function testIncomeCategory(string $range): void{$transaction = factory(Transaction::class)->make();$account = factory(Account::class)->make();@@ -265,7 +265,7 @@ class AccountControllerTest extends TestCase** @param string $range*/- public function testIncomeCategoryAll(string $range)+ public function testIncomeCategoryAll(string $range): void{$transaction = factory(Transaction::class)->make();$account = factory(Account::class)->make();@@ -295,7 +295,7 @@ class AccountControllerTest extends TestCase** @param string $range*/- public function testPeriod(string $range)+ public function testPeriod(string $range): void{$generator = $this->mock(GeneratorInterface::class);$accountRepos = $this->mock(AccountRepositoryInterface::class);@@ -314,7 +314,7 @@ class AccountControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Chart\AccountController::report* @covers \FireflyIII\Http\Controllers\Chart\AccountController::accountBalanceChart*/- public function testReport()+ public function testReport(): void{$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);$currencyRepos->shouldReceive('findNull')->andReturn(TransactionCurrency::find(1));@@ -333,7 +333,7 @@ class AccountControllerTest extends TestCase** @param string $range*/- public function testRevenueAccounts(string $range)+ public function testRevenueAccounts(string $range): void{$account = factory(Account::class)->make();$generator = $this->mock(GeneratorInterface::class);diff --git a/tests/Feature/Controllers/Chart/BillControllerTest.php b/tests/Feature/Controllers/Chart/BillControllerTest.phpindex bc36781b77..af5cd40359 100644--- a/tests/Feature/Controllers/Chart/BillControllerTest.php+++ b/tests/Feature/Controllers/Chart/BillControllerTest.php@@ -55,7 +55,7 @@ class BillControllerTest extends TestCase** @param string $range*/- public function testFrontpage(string $range)+ public function testFrontpage(string $range): void{$generator = $this->mock(GeneratorInterface::class);$repository = $this->mock(BillRepositoryInterface::class);@@ -73,7 +73,7 @@ class BillControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Chart\BillController::single*/- public function testSingle()+ public function testSingle(): void{$transaction = factory(Transaction::class)->make();$generator = $this->mock(GeneratorInterface::class);diff --git a/tests/Feature/Controllers/Chart/BudgetControllerTest.php b/tests/Feature/Controllers/Chart/BudgetControllerTest.phpindex 99bb3c15fa..876a2bdeee 100644--- a/tests/Feature/Controllers/Chart/BudgetControllerTest.php+++ b/tests/Feature/Controllers/Chart/BudgetControllerTest.php@@ -63,7 +63,7 @@ class BudgetControllerTest extends TestCase** @param string $range*/- public function testBudget(string $range)+ public function testBudget(string $range): void{$repository = $this->mock(BudgetRepositoryInterface::class);$generator = $this->mock(GeneratorInterface::class);@@ -84,7 +84,7 @@ class BudgetControllerTest extends TestCase** @param string $range*/- public function testBudgetLimit(string $range)+ public function testBudgetLimit(string $range): void{$repository = $this->mock(BudgetRepositoryInterface::class);$generator = $this->mock(GeneratorInterface::class);@@ -102,7 +102,7 @@ class BudgetControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Chart\BudgetController::budgetLimit* @expectedExceptionMessage This budget limit is not part of this budget.*/- public function testBudgetLimitWrongLimit()+ public function testBudgetLimitWrongLimit(): void{$repository = $this->mock(BudgetRepositoryInterface::class);$generator = $this->mock(GeneratorInterface::class);@@ -119,7 +119,7 @@ class BudgetControllerTest extends TestCase** @param string $range*/- public function testExpenseAsset(string $range)+ public function testExpenseAsset(string $range): void{$budgetRepository = $this->mock(BudgetRepositoryInterface::class);$generator = $this->mock(GeneratorInterface::class);@@ -148,7 +148,7 @@ class BudgetControllerTest extends TestCase** @param string $range*/- public function testExpenseCategory(string $range)+ public function testExpenseCategory(string $range): void{$generator = $this->mock(GeneratorInterface::class);$collector = $this->mock(JournalCollectorInterface::class);@@ -182,7 +182,7 @@ class BudgetControllerTest extends TestCase** @param string $range*/- public function testExpenseExpense(string $range)+ public function testExpenseExpense(string $range): void{$generator = $this->mock(GeneratorInterface::class);$collector = $this->mock(JournalCollectorInterface::class);@@ -218,7 +218,7 @@ class BudgetControllerTest extends TestCase** @param string $range*/- public function testFrontpage(string $range)+ public function testFrontpage(string $range): void{$repository = $this->mock(BudgetRepositoryInterface::class);$generator = $this->mock(GeneratorInterface::class);@@ -255,7 +255,7 @@ class BudgetControllerTest extends TestCase** @param string $range*/- public function testFrontpageMultiLimit(string $range)+ public function testFrontpageMultiLimit(string $range): void{$repository = $this->mock(BudgetRepositoryInterface::class);$generator = $this->mock(GeneratorInterface::class);@@ -294,7 +294,7 @@ class BudgetControllerTest extends TestCase** @param string $range*/- public function testFrontpageNoLimits(string $range)+ public function testFrontpageNoLimits(string $range): void{$repository = $this->mock(BudgetRepositoryInterface::class);$generator = $this->mock(GeneratorInterface::class);@@ -324,7 +324,7 @@ class BudgetControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Chart\BudgetController::period* @covers \FireflyIII\Http\Controllers\Chart\BudgetController::getBudgetedInPeriod*/- public function testPeriod()+ public function testPeriod(): void{$repository = $this->mock(BudgetRepositoryInterface::class);$generator = $this->mock(GeneratorInterface::class);@@ -344,7 +344,7 @@ class BudgetControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Chart\BudgetController::periodNoBudget*/- public function testPeriodNoBudget()+ public function testPeriodNoBudget(): void{$repository = $this->mock(BudgetRepositoryInterface::class);$generator = $this->mock(GeneratorInterface::class);diff --git a/tests/Feature/Controllers/Chart/BudgetReportControllerTest.php b/tests/Feature/Controllers/Chart/BudgetReportControllerTest.phpindex bc49db303c..7d21d2f3b1 100644--- a/tests/Feature/Controllers/Chart/BudgetReportControllerTest.php+++ b/tests/Feature/Controllers/Chart/BudgetReportControllerTest.php@@ -59,7 +59,7 @@ class BudgetReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Chart\BudgetReportController::accountExpense* @covers \FireflyIII\Http\Controllers\Chart\BudgetReportController::__construct*/- public function testAccountExpense()+ public function testAccountExpense(): void{$budgetRepos = $this->mock(BudgetRepositoryInterface::class);$generator = $this->mock(GeneratorInterface::class);@@ -82,7 +82,7 @@ class BudgetReportControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Chart\BudgetReportController::budgetExpense*/- public function testBudgetExpense()+ public function testBudgetExpense(): void{$budgetRepos = $this->mock(BudgetRepositoryInterface::class);$generator = $this->mock(GeneratorInterface::class);@@ -107,7 +107,7 @@ class BudgetReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Chart\BudgetReportController::getExpenses* @covers \FireflyIII\Http\Controllers\Chart\BudgetReportController::groupByBudget*/- public function testMainChart()+ public function testMainChart(): void{$generator = $this->mock(GeneratorInterface::class);$collector = $this->mock(JournalCollectorInterface::class);diff --git a/tests/Feature/Controllers/Chart/CategoryControllerTest.php b/tests/Feature/Controllers/Chart/CategoryControllerTest.phpindex 21423e1488..e21fe2e7a4 100644--- a/tests/Feature/Controllers/Chart/CategoryControllerTest.php+++ b/tests/Feature/Controllers/Chart/CategoryControllerTest.php@@ -58,7 +58,7 @@ class CategoryControllerTest extends TestCase** @param string $range*/- public function testAll(string $range)+ public function testAll(string $range): void{$repository = $this->mock(CategoryRepositoryInterface::class);@@ -85,7 +85,7 @@ class CategoryControllerTest extends TestCase** @param string $range*/- public function testFrontpage(string $range)+ public function testFrontpage(string $range): void{$repository = $this->mock(CategoryRepositoryInterface::class);$accountRepos = $this->mock(AccountRepositoryInterface::class);@@ -108,7 +108,7 @@ class CategoryControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Chart\CategoryController::reportPeriod*/- public function testReportPeriod()+ public function testReportPeriod(): void{$repository = $this->mock(CategoryRepositoryInterface::class);$generator = $this->mock(GeneratorInterface::class);@@ -125,7 +125,7 @@ class CategoryControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Chart\CategoryController::reportPeriodNoCategory*/- public function testReportPeriodNoCategory()+ public function testReportPeriodNoCategory(): void{$repository = $this->mock(CategoryRepositoryInterface::class);$generator = $this->mock(GeneratorInterface::class);@@ -146,7 +146,7 @@ class CategoryControllerTest extends TestCase** @param string $range*/- public function testSpecificPeriod(string $range)+ public function testSpecificPeriod(string $range): void{$repository = $this->mock(CategoryRepositoryInterface::class);$accountRepos = $this->mock(AccountRepositoryInterface::class);diff --git a/tests/Feature/Controllers/Chart/CategoryReportControllerTest.php b/tests/Feature/Controllers/Chart/CategoryReportControllerTest.phpindex 84ffe289dd..dbe80eb377 100644--- a/tests/Feature/Controllers/Chart/CategoryReportControllerTest.php+++ b/tests/Feature/Controllers/Chart/CategoryReportControllerTest.php@@ -56,7 +56,7 @@ class CategoryReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Chart\CategoryReportController::accountExpense* @covers \FireflyIII\Http\Controllers\Chart\CategoryReportController::__construct*/- public function testAccountExpense()+ public function testAccountExpense(): void{$generator = $this->mock(GeneratorInterface::class);$pieChart = $this->mock(MetaPieChartInterface::class);@@ -77,7 +77,7 @@ class CategoryReportControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Chart\CategoryReportController::accountIncome*/- public function testAccountIncome()+ public function testAccountIncome(): void{$generator = $this->mock(GeneratorInterface::class);$pieChart = $this->mock(MetaPieChartInterface::class);@@ -98,7 +98,7 @@ class CategoryReportControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Chart\CategoryReportController::categoryExpense*/- public function testCategoryExpense()+ public function testCategoryExpense(): void{$generator = $this->mock(GeneratorInterface::class);$pieChart = $this->mock(MetaPieChartInterface::class);@@ -119,7 +119,7 @@ class CategoryReportControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Chart\CategoryReportController::categoryIncome*/- public function testCategoryIncome()+ public function testCategoryIncome(): void{$generator = $this->mock(GeneratorInterface::class);$pieChart = $this->mock(MetaPieChartInterface::class);@@ -143,7 +143,7 @@ class CategoryReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Chart\CategoryReportController::getExpenses* @covers \FireflyIII\Http\Controllers\Chart\CategoryReportController::getIncome*/- public function testMainChart()+ public function testMainChart(): void{$generator = $this->mock(GeneratorInterface::class);$collector = $this->mock(JournalCollectorInterface::class);diff --git a/tests/Feature/Controllers/Chart/ExpenseReportControllerTest.php b/tests/Feature/Controllers/Chart/ExpenseReportControllerTest.phpindex 5a681b64ee..ede81ec9fd 100644--- a/tests/Feature/Controllers/Chart/ExpenseReportControllerTest.php+++ b/tests/Feature/Controllers/Chart/ExpenseReportControllerTest.php@@ -58,7 +58,7 @@ class ExpenseReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Chart\ExpenseReportController::getIncome* @covers \FireflyIII\Http\Controllers\Chart\ExpenseReportController::combineAccounts*/- public function testMainChart()+ public function testMainChart(): void{$expense = $this->user()->accounts()->where('account_type_id', 4)->first();$generator = $this->mock(GeneratorInterface::class);diff --git a/tests/Feature/Controllers/Chart/PiggyBankControllerTest.php b/tests/Feature/Controllers/Chart/PiggyBankControllerTest.phpindex c9f4439ad9..e11d5b66c8 100644--- a/tests/Feature/Controllers/Chart/PiggyBankControllerTest.php+++ b/tests/Feature/Controllers/Chart/PiggyBankControllerTest.php@@ -51,7 +51,7 @@ class PiggyBankControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Chart\PiggyBankController::history* @covers \FireflyIII\Http\Controllers\Chart\PiggyBankController::__construct*/- public function testHistory()+ public function testHistory(): void{$generator = $this->mock(GeneratorInterface::class);$repository = $this->mock(PiggyBankRepositoryInterface::class);diff --git a/tests/Feature/Controllers/Chart/ReportControllerTest.php b/tests/Feature/Controllers/Chart/ReportControllerTest.phpindex 9b0c91444d..c13b21cced 100644--- a/tests/Feature/Controllers/Chart/ReportControllerTest.php+++ b/tests/Feature/Controllers/Chart/ReportControllerTest.php@@ -51,7 +51,7 @@ class ReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Chart\ReportController::arraySum* @covers \FireflyIII\Http\Controllers\Chart\ReportController::__construct*/- public function testNetWorth()+ public function testNetWorth(): void{$generator = $this->mock(GeneratorInterface::class);@@ -67,7 +67,7 @@ class ReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Chart\ReportController::operations* @covers \FireflyIII\Http\Controllers\Chart\ReportController::getChartData*/- public function testOperations()+ public function testOperations(): void{$generator = $this->mock(GeneratorInterface::class);$tasker = $this->mock(AccountTaskerInterface::class);@@ -86,7 +86,7 @@ class ReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Chart\ReportController::sum* @covers \FireflyIII\Http\Controllers\Chart\ReportController::getChartData*/- public function testSum()+ public function testSum(): void{$generator = $this->mock(GeneratorInterface::class);$tasker = $this->mock(AccountTaskerInterface::class);diff --git a/tests/Feature/Controllers/Chart/TagReportControllerTest.php b/tests/Feature/Controllers/Chart/TagReportControllerTest.phpindex 375ad01c6b..8b016cc1a5 100644--- a/tests/Feature/Controllers/Chart/TagReportControllerTest.php+++ b/tests/Feature/Controllers/Chart/TagReportControllerTest.php@@ -60,7 +60,7 @@ class TagReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Chart\TagReportController::accountExpense* @covers \FireflyIII\Http\Controllers\Chart\TagReportController::__construct*/- public function testAccountExpense()+ public function testAccountExpense(): void{$generator = $this->mock(GeneratorInterface::class);$pieChart = $this->mock(MetaPieChartInterface::class);@@ -88,7 +88,7 @@ class TagReportControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Chart\TagReportController::accountIncome*/- public function testAccountIncome()+ public function testAccountIncome(): void{$generator = $this->mock(GeneratorInterface::class);$pieChart = $this->mock(MetaPieChartInterface::class);@@ -115,7 +115,7 @@ class TagReportControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Chart\TagReportController::budgetExpense()*/- public function testBudgetExpense()+ public function testBudgetExpense(): void{$generator = $this->mock(GeneratorInterface::class);$pieChart = $this->mock(MetaPieChartInterface::class);@@ -141,7 +141,7 @@ class TagReportControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Chart\TagReportController::categoryExpense()*/- public function testCategoryExpense()+ public function testCategoryExpense(): void{$generator = $this->mock(GeneratorInterface::class);$pieChart = $this->mock(MetaPieChartInterface::class);@@ -170,7 +170,7 @@ class TagReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Chart\TagReportController::getIncome* @covers \FireflyIII\Http\Controllers\Chart\TagReportController::groupByTag*/- public function testMainChart()+ public function testMainChart(): void{$generator = $this->mock(GeneratorInterface::class);$collector = $this->mock(JournalCollectorInterface::class);@@ -209,7 +209,7 @@ class TagReportControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Chart\TagReportController::tagExpense()*/- public function testTagExpense()+ public function testTagExpense(): void{$generator = $this->mock(GeneratorInterface::class);$pieChart = $this->mock(MetaPieChartInterface::class);@@ -235,7 +235,7 @@ class TagReportControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Chart\TagReportController::tagIncome*/- public function testTagIncome()+ public function testTagIncome(): void{$generator = $this->mock(GeneratorInterface::class);$pieChart = $this->mock(MetaPieChartInterface::class);diff --git a/tests/Feature/Controllers/CurrencyControllerTest.php b/tests/Feature/Controllers/CurrencyControllerTest.phpindex f1a56b1b73..04c11c88bf 100644--- a/tests/Feature/Controllers/CurrencyControllerTest.php+++ b/tests/Feature/Controllers/CurrencyControllerTest.php@@ -53,7 +53,7 @@ class CurrencyControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\CurrencyController::create*/- public function testCannotCreate()+ public function testCannotCreate(): void{// mock stuff$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);@@ -72,7 +72,7 @@ class CurrencyControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\CurrencyController::delete*/- public function testCannotDelete()+ public function testCannotDelete(): void{// mock stuff$repository = $this->mock(CurrencyRepositoryInterface::class);@@ -92,7 +92,7 @@ class CurrencyControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\CurrencyController::destroy*/- public function testCannotDestroy()+ public function testCannotDestroy(): void{// mock stuff$repository = $this->mock(CurrencyRepositoryInterface::class);@@ -113,7 +113,7 @@ class CurrencyControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\CurrencyController::create*/- public function testCreate()+ public function testCreate(): void{// mock stuff$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);@@ -133,7 +133,7 @@ class CurrencyControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\CurrencyController::defaultCurrency*/- public function testDefaultCurrency()+ public function testDefaultCurrency(): void{// mock stuff$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);@@ -151,7 +151,7 @@ class CurrencyControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\CurrencyController::delete*/- public function testDelete()+ public function testDelete(): void{// mock stuff$repository = $this->mock(CurrencyRepositoryInterface::class);@@ -172,7 +172,7 @@ class CurrencyControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\CurrencyController::destroy*/- public function testDestroy()+ public function testDestroy(): void{// mock stuff$repository = $this->mock(CurrencyRepositoryInterface::class);@@ -194,7 +194,7 @@ class CurrencyControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\CurrencyController::edit*/- public function testEdit()+ public function testEdit(): void{// mock stuff$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);@@ -215,7 +215,7 @@ class CurrencyControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\CurrencyController::index* @covers \FireflyIII\Http\Controllers\CurrencyController::__construct*/- public function testIndex()+ public function testIndex(): void{// mock stuff$repository = $this->mock(CurrencyRepositoryInterface::class);@@ -240,7 +240,7 @@ class CurrencyControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\CurrencyController::index* @covers \FireflyIII\Http\Controllers\CurrencyController::__construct*/- public function testIndexNoRights()+ public function testIndexNoRights(): void{// mock stuff$repository = $this->mock(CurrencyRepositoryInterface::class);@@ -264,7 +264,7 @@ class CurrencyControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\CurrencyController::store* @covers \FireflyIII\Http\Requests\CurrencyFormRequest*/- public function testStore()+ public function testStore(): void{// mock stuff$repository = $this->mock(CurrencyRepositoryInterface::class);@@ -292,7 +292,7 @@ class CurrencyControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\CurrencyController::store* @covers \FireflyIII\Http\Requests\CurrencyFormRequest*/- public function testStoreNoRights()+ public function testStoreNoRights(): void{// mock stuff$repository = $this->mock(CurrencyRepositoryInterface::class);@@ -320,7 +320,7 @@ class CurrencyControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\CurrencyController::update* @covers \FireflyIII\Http\Requests\CurrencyFormRequest*/- public function testUpdate()+ public function testUpdate(): void{// mock stuff$repository = $this->mock(CurrencyRepositoryInterface::class);diff --git a/tests/Feature/Controllers/DebugControllerTest.php b/tests/Feature/Controllers/DebugControllerTest.phpindex 29aa116253..960b9dabed 100644--- a/tests/Feature/Controllers/DebugControllerTest.php+++ b/tests/Feature/Controllers/DebugControllerTest.php@@ -49,7 +49,7 @@ class DebugControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\DebugController::errorReporting* @covers \FireflyIII\Http\Controllers\DebugController::collectPackages*/- public function testIndex()+ public function testIndex(): void{$this->be($this->user());$response = $this->get(route('debug'));diff --git a/tests/Feature/Controllers/ExportControllerTest.php b/tests/Feature/Controllers/ExportControllerTest.phpindex 43fd833e5b..74792cbc04 100644--- a/tests/Feature/Controllers/ExportControllerTest.php+++ b/tests/Feature/Controllers/ExportControllerTest.php@@ -55,7 +55,7 @@ class ExportControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\ExportController::download*/- public function testDownload()+ public function testDownload(): void{// mock stuff$repository = $this->mock(ExportJobRepositoryInterface::class);@@ -74,7 +74,7 @@ class ExportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\ExportController::download* @expectedExceptionMessage Against all expectations*/- public function testDownloadFailed()+ public function testDownloadFailed(): void{// mock stuff$repository = $this->mock(ExportJobRepositoryInterface::class);@@ -91,7 +91,7 @@ class ExportControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\ExportController::getStatus*/- public function testGetStatus()+ public function testGetStatus(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -106,7 +106,7 @@ class ExportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\ExportController::index* @covers \FireflyIII\Http\Controllers\ExportController::__construct*/- public function testIndex()+ public function testIndex(): void{// mock stuff$repository = $this->mock(ExportJobRepositoryInterface::class);@@ -130,7 +130,7 @@ class ExportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\ExportController::postIndex* @covers \FireflyIII\Http\Requests\ExportFormRequest*/- public function testPostIndex()+ public function testPostIndex(): void{// mock stuff$repository = $this->mock(ExportJobRepositoryInterface::class);diff --git a/tests/Feature/Controllers/HelpControllerTest.php b/tests/Feature/Controllers/HelpControllerTest.phpindex a0373b3a81..10689dc8e2 100644--- a/tests/Feature/Controllers/HelpControllerTest.php+++ b/tests/Feature/Controllers/HelpControllerTest.php@@ -50,7 +50,7 @@ class HelpControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\HelpController::getHelpText* @covers \FireflyIII\Http\Controllers\HelpController::__construct*/- public function testShow()+ public function testShow(): void{$help = $this->mock(HelpInterface::class);$help->shouldReceive('hasRoute')->andReturn(true)->once();@@ -68,7 +68,7 @@ class HelpControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\HelpController::show* @covers \FireflyIII\Http\Controllers\HelpController::getHelpText*/- public function testShowBackupFromCache()+ public function testShowBackupFromCache(): void{// force pref in dutch for testPreference::where('user_id', $this->user()->id)->where('name', 'language')->delete();@@ -97,7 +97,7 @@ class HelpControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\HelpController::show* @covers \FireflyIII\Http\Controllers\HelpController::getHelpText*/- public function testShowBackupFromGithub()+ public function testShowBackupFromGithub(): void{// force pref in dutch for testPreference::where('user_id', $this->user()->id)->where('name', 'language')->delete();@@ -126,7 +126,7 @@ class HelpControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\HelpController::show* @covers \FireflyIII\Http\Controllers\HelpController::getHelpText*/- public function testShowCached()+ public function testShowCached(): void{$help = $this->mock(HelpInterface::class);$help->shouldReceive('hasRoute')->andReturn(true)->once();@@ -143,7 +143,7 @@ class HelpControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\HelpController::show* @covers \FireflyIII\Http\Controllers\HelpController::getHelpText*/- public function testShowNoRoute()+ public function testShowNoRoute(): void{$help = $this->mock(HelpInterface::class);$help->shouldReceive('hasRoute')->andReturn(false)->once();diff --git a/tests/Feature/Controllers/HomeControllerTest.php b/tests/Feature/Controllers/HomeControllerTest.phpindex fd5845358f..807c9d0dd2 100644--- a/tests/Feature/Controllers/HomeControllerTest.php+++ b/tests/Feature/Controllers/HomeControllerTest.php@@ -59,7 +59,7 @@ class HomeControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\HomeController::dateRange* @covers \FireflyIII\Http\Controllers\HomeController::__construct*/- public function testDateRange()+ public function testDateRange(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -81,7 +81,7 @@ class HomeControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\HomeController::dateRange* @covers \FireflyIII\Http\Controllers\HomeController::__construct*/- public function testDateRangeCustom()+ public function testDateRangeCustom(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -103,7 +103,7 @@ class HomeControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\HomeController::displayError*/- public function testDisplayError()+ public function testDisplayError(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -117,7 +117,7 @@ class HomeControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\HomeController::flush*/- public function testFlush()+ public function testFlush(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -136,7 +136,7 @@ class HomeControllerTest extends TestCase** @param $range*/- public function testIndex(string $range)+ public function testIndex(string $range): void{// mock stuff$account = factory(Account::class)->make();@@ -173,7 +173,7 @@ class HomeControllerTest extends TestCase** @param $range*/- public function testIndexEmpty(string $range)+ public function testIndexEmpty(string $range): void{// mock stuff$accountRepos = $this->mock(AccountRepositoryInterface::class);@@ -190,7 +190,7 @@ class HomeControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\HomeController::routes()*/- public function testRoutes()+ public function testRoutes(): void{$this->be($this->user());$response = $this->get(route('routes'));@@ -200,7 +200,7 @@ class HomeControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\HomeController::testFlash*/- public function testTestFlash()+ public function testTestFlash(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);diff --git a/tests/Feature/Controllers/Import/IndexControllerTest.php b/tests/Feature/Controllers/Import/IndexControllerTest.phpindex a9e5c2d659..fdf2af1486 100644--- a/tests/Feature/Controllers/Import/IndexControllerTest.php+++ b/tests/Feature/Controllers/Import/IndexControllerTest.php@@ -24,7 +24,6 @@ namespace Tests\Feature\Controllers\Import;use FireflyIII\Import\Prerequisites\BunqPrerequisites;use FireflyIII\Import\Prerequisites\FakePrerequisites;-use FireflyIII\Import\Prerequisites\FilePrerequisites;use FireflyIII\Import\Prerequisites\SpectrePrerequisites;use FireflyIII\Models\ImportJob;use FireflyIII\Repositories\ImportJob\ImportJobRepositoryInterface;@@ -53,7 +52,7 @@ class IndexControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Import\IndexController*/- public function testCreateFake()+ public function testCreateFake(): void{// mock stuff:$repository = $this->mock(ImportJobRepositoryInterface::class);@@ -106,7 +105,7 @@ class IndexControllerTest extends TestCase$response->assertRedirect(route('import.job.configuration.index', ['fake_job_2']));}- public function testIndex()+ public function testIndex(): void{$this->be($this->user());diff --git a/tests/Feature/Controllers/JavascriptControllerTest.php b/tests/Feature/Controllers/JavascriptControllerTest.phpindex 6a4584da05..25fbda206f 100644--- a/tests/Feature/Controllers/JavascriptControllerTest.php+++ b/tests/Feature/Controllers/JavascriptControllerTest.php@@ -54,7 +54,7 @@ class JavascriptControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\JavascriptController::accounts*/- public function testAccounts()+ public function testAccounts(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);@@ -73,7 +73,7 @@ class JavascriptControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\JavascriptController::currencies*/- public function testCurrencies()+ public function testCurrencies(): void{$repository = $this->mock(CurrencyRepositoryInterface::class);$currency = factory(TransactionCurrency::class)->make();@@ -94,7 +94,7 @@ class JavascriptControllerTest extends TestCase** @dataProvider dateRangeProvider*/- public function testVariables(string $range)+ public function testVariables(string $range): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);@@ -115,7 +115,7 @@ class JavascriptControllerTest extends TestCase** @dataProvider dateRangeProvider*/- public function testVariablesCustom(string $range)+ public function testVariablesCustom(string $range): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);diff --git a/tests/Feature/Controllers/Json/AutoCompleteControllerTest.php b/tests/Feature/Controllers/Json/AutoCompleteControllerTest.phpindex ca04c1f617..cc165747d1 100644--- a/tests/Feature/Controllers/Json/AutoCompleteControllerTest.php+++ b/tests/Feature/Controllers/Json/AutoCompleteControllerTest.php@@ -57,7 +57,7 @@ class AutoCompleteControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Json\AutoCompleteController::allAccounts*/- public function testAllAccounts()+ public function testAllAccounts(): void{// mock stuff$accountA = factory(Account::class)->make();@@ -77,7 +77,7 @@ class AutoCompleteControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Json\AutoCompleteController::allTransactionJournals*/- public function testAllTransactionJournals()+ public function testAllTransactionJournals(): void{$collector = $this->mock(JournalCollectorInterface::class);$collector->shouldReceive('setLimit')->withArgs([250])->andReturnSelf();@@ -92,7 +92,7 @@ class AutoCompleteControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Json\AutoCompleteController::budgets*/- public function testBudgets()+ public function testBudgets(): void{// mock stuff$budget = factory(Budget::class)->make();@@ -109,7 +109,7 @@ class AutoCompleteControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Json\AutoCompleteController::categories*/- public function testCategories()+ public function testCategories(): void{// mock stuff$category = factory(Category::class)->make();@@ -126,7 +126,7 @@ class AutoCompleteControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Json\AutoCompleteController::expenseAccounts*/- public function testExpenseAccounts()+ public function testExpenseAccounts(): void{// mock stuff$accountA = factory(Account::class)->make();@@ -148,7 +148,7 @@ class AutoCompleteControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Json\AutoCompleteController::journalsWithId*/- public function testJournalsWithId()+ public function testJournalsWithId(): void{$journal = $this->user()->transactionJournals()->where('id', '!=', 1)->first();$journal->journal_id = $journal->id;@@ -167,7 +167,7 @@ class AutoCompleteControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Json\AutoCompleteController::revenueAccounts*/- public function testRevenueAccounts()+ public function testRevenueAccounts(): void{// mock stuff$accountA = factory(Account::class)->make();@@ -189,7 +189,7 @@ class AutoCompleteControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Json\AutoCompleteController::tags*/- public function testTags()+ public function testTags(): void{// mock stuff$tag = factory(Tag::class)->make();@@ -207,7 +207,7 @@ class AutoCompleteControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Json\AutoCompleteController::transactionJournals*/- public function testTransactionJournals()+ public function testTransactionJournals(): void{// mock stuff$collector = $this->mock(JournalCollectorInterface::class);diff --git a/tests/Feature/Controllers/Json/BoxControllerTest.php b/tests/Feature/Controllers/Json/BoxControllerTest.phpindex d256af6183..70f99765d0 100644--- a/tests/Feature/Controllers/Json/BoxControllerTest.php+++ b/tests/Feature/Controllers/Json/BoxControllerTest.php@@ -51,7 +51,7 @@ class BoxControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Json\BoxController::available*/- public function testAvailable()+ public function testAvailable(): void{$return = [0 => [@@ -72,7 +72,7 @@ class BoxControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Json\BoxController::balance*/- public function testBalance()+ public function testBalance(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$collector = $this->mock(JournalCollectorInterface::class);@@ -93,7 +93,7 @@ class BoxControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Json\BoxController::bills*/- public function testBills()+ public function testBills(): void{$billRepos = $this->mock(BillRepositoryInterface::class);$billRepos->shouldReceive('getBillsPaidInRange')->andReturn('0');@@ -107,7 +107,7 @@ class BoxControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Json\BoxController::netWorth()*/- public function testNetWorth()+ public function testNetWorth(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);@@ -124,7 +124,7 @@ class BoxControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Json\BoxController::netWorth()*/- public function testNetWorthFuture()+ public function testNetWorthFuture(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);diff --git a/tests/Feature/Controllers/Json/ExchangeControllerTest.php b/tests/Feature/Controllers/Json/ExchangeControllerTest.phpindex 2a988029d0..b14ef260be 100644--- a/tests/Feature/Controllers/Json/ExchangeControllerTest.php+++ b/tests/Feature/Controllers/Json/ExchangeControllerTest.php@@ -48,7 +48,7 @@ class ExchangeControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Json\ExchangeController::getRate*/- public function testGetRate()+ public function testGetRate(): void{$repository = $this->mock(CurrencyRepositoryInterface::class);@@ -63,7 +63,7 @@ class ExchangeControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Json\ExchangeController::getRate*/- public function testGetRateAmount()+ public function testGetRateAmount(): void{$repository = $this->mock(CurrencyRepositoryInterface::class);$rate = factory(CurrencyExchangeRate::class)->make();diff --git a/tests/Feature/Controllers/Json/FrontpageControllerTest.php b/tests/Feature/Controllers/Json/FrontpageControllerTest.phpindex 4aa8a2cc8e..1b55763e05 100644--- a/tests/Feature/Controllers/Json/FrontpageControllerTest.php+++ b/tests/Feature/Controllers/Json/FrontpageControllerTest.php@@ -48,7 +48,7 @@ class FrontpageControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Json\FrontpageController::piggyBanks*/- public function testPiggyBanks()+ public function testPiggyBanks(): void{$piggy = $this->user()->piggyBanks()->first();$repository = $this->mock(PiggyBankRepositoryInterface::class);diff --git a/tests/Feature/Controllers/Json/IntroControllerTest.php b/tests/Feature/Controllers/Json/IntroControllerTest.phpindex ea69192574..924c3ca86f 100644--- a/tests/Feature/Controllers/Json/IntroControllerTest.php+++ b/tests/Feature/Controllers/Json/IntroControllerTest.php@@ -49,7 +49,7 @@ class IntroControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Json\IntroController::getSpecificSteps* @covers \FireflyIII\Http\Controllers\Json\IntroController::hasOutroStep*/- public function testGetIntroSteps()+ public function testGetIntroSteps(): void{$this->be($this->user());$response = $this->get(route('json.intro', ['index']));@@ -62,7 +62,7 @@ class IntroControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Json\IntroController::getSpecificSteps* @covers \FireflyIII\Http\Controllers\Json\IntroController::hasOutroStep*/- public function testGetIntroStepsAsset()+ public function testGetIntroStepsAsset(): void{$this->be($this->user());$response = $this->get(route('json.intro', ['accounts_create', 'asset']));@@ -75,7 +75,7 @@ class IntroControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Json\IntroController::getSpecificSteps* @covers \FireflyIII\Http\Controllers\Json\IntroController::hasOutroStep*/- public function testGetIntroStepsOutro()+ public function testGetIntroStepsOutro(): void{$this->be($this->user());$response = $this->get(route('json.intro', ['reports_report', 'category']));@@ -85,7 +85,7 @@ class IntroControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Json\IntroController::postEnable*/- public function testPostEnable()+ public function testPostEnable(): void{$this->be($this->user());$response = $this->post(route('json.intro.enable', ['accounts_create', 'asset']));@@ -95,7 +95,7 @@ class IntroControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Json\IntroController::postFinished*/- public function testPostFinished()+ public function testPostFinished(): void{$this->be($this->user());$response = $this->post(route('json.intro.finished', ['accounts_create', 'asset']));diff --git a/tests/Feature/Controllers/JsonControllerTest.php b/tests/Feature/Controllers/JsonControllerTest.phpindex acaf571179..a163c15f56 100644--- a/tests/Feature/Controllers/JsonControllerTest.php+++ b/tests/Feature/Controllers/JsonControllerTest.php@@ -49,7 +49,7 @@ class JsonControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\JsonController::action* @covers \FireflyIII\Http\Controllers\JsonController::__construct*/- public function testAction()+ public function testAction(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -63,7 +63,7 @@ class JsonControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\JsonController::trigger*/- public function testTrigger()+ public function testTrigger(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);diff --git a/tests/Feature/Controllers/NewUserControllerTest.php b/tests/Feature/Controllers/NewUserControllerTest.phpindex 933821bc49..0e9a3e45ac 100644--- a/tests/Feature/Controllers/NewUserControllerTest.php+++ b/tests/Feature/Controllers/NewUserControllerTest.php@@ -53,7 +53,7 @@ class NewUserControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\NewUserController::index* @covers \FireflyIII\Http\Controllers\NewUserController::__construct*/- public function testIndex()+ public function testIndex(): void{// mock stuff$accountRepos = $this->mock(AccountRepositoryInterface::class);@@ -71,7 +71,7 @@ class NewUserControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\NewUserController::index* @covers \FireflyIII\Http\Controllers\NewUserController::__construct*/- public function testIndexExisting()+ public function testIndexExisting(): void{// mock stuff$accountRepos = $this->mock(AccountRepositoryInterface::class);@@ -90,7 +90,7 @@ class NewUserControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\NewUserController::createAssetAccount* @covers \FireflyIII\Http\Controllers\NewUserController::createSavingsAccount*/- public function testSubmit()+ public function testSubmit(): void{// mock stuff$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);@@ -116,7 +116,7 @@ class NewUserControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\NewUserController::submit*/- public function testSubmitSingle()+ public function testSubmitSingle(): void{// mock stuff$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);diff --git a/tests/Feature/Controllers/PiggyBankControllerTest.php b/tests/Feature/Controllers/PiggyBankControllerTest.phpindex 558ef244f9..16565539bf 100644--- a/tests/Feature/Controllers/PiggyBankControllerTest.php+++ b/tests/Feature/Controllers/PiggyBankControllerTest.php@@ -59,7 +59,7 @@ class PiggyBankControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\PiggyBankController::add*/- public function testAdd()+ public function testAdd(): void{// mock stuff$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);@@ -76,7 +76,7 @@ class PiggyBankControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\PiggyBankController::addMobile*/- public function testAddMobile()+ public function testAddMobile(): void{// mock stuff$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);@@ -94,7 +94,7 @@ class PiggyBankControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\PiggyBankController::create*/- public function testCreate()+ public function testCreate(): void{// mock stuff@@ -126,7 +126,7 @@ class PiggyBankControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\PiggyBankController::delete*/- public function testDelete()+ public function testDelete(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -141,7 +141,7 @@ class PiggyBankControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\PiggyBankController::destroy*/- public function testDestroy()+ public function testDestroy(): void{// mock stuff$repository = $this->mock(PiggyBankRepositoryInterface::class);@@ -161,7 +161,7 @@ class PiggyBankControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\PiggyBankController::edit*/- public function testEdit()+ public function testEdit(): void{// mock stuff$account = factory(Account::class)->make();@@ -192,7 +192,7 @@ class PiggyBankControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\PiggyBankController::index* @covers \FireflyIII\Http\Controllers\PiggyBankController::__construct*/- public function testIndex()+ public function testIndex(): void{// mock stuff$repository = $this->mock(PiggyBankRepositoryInterface::class);diff --git a/tests/Feature/Controllers/Popup/ReportControllerTest.php b/tests/Feature/Controllers/Popup/ReportControllerTest.phpindex e384c20533..ae78a63c6b 100644--- a/tests/Feature/Controllers/Popup/ReportControllerTest.php+++ b/tests/Feature/Controllers/Popup/ReportControllerTest.php@@ -58,7 +58,7 @@ class ReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Popup\ReportController::parseAttributes* @expectedExceptionMessage Could not parse end date*/- public function testBadEndDate()+ public function testBadEndDate(): void{$this->be($this->user());$arguments = [@@ -82,7 +82,7 @@ class ReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Popup\ReportController::parseAttributes* @expectedExceptionMessage Could not parse start date*/- public function testBadStartDate()+ public function testBadStartDate(): void{$this->be($this->user());$arguments = [@@ -106,7 +106,7 @@ class ReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Popup\ReportController::parseAttributes* @covers \FireflyIII\Http\Controllers\Popup\ReportController::balanceAmount*/- public function testBalanceAmountDefaultNoBudget()+ public function testBalanceAmountDefaultNoBudget(): void{$categoryRepos = $this->mock(CategoryRepositoryInterface::class);$accountRepos = $this->mock(AccountRepositoryInterface::class);@@ -142,7 +142,7 @@ class ReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Popup\ReportController::parseAttributes* @covers \FireflyIII\Http\Controllers\Popup\ReportController::balanceAmount*/- public function testBalanceAmountDefaultRole()+ public function testBalanceAmountDefaultRole(): void{$categoryRepos = $this->mock(CategoryRepositoryInterface::class);$accountRepos = $this->mock(AccountRepositoryInterface::class);@@ -178,7 +178,7 @@ class ReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Popup\ReportController::parseAttributes* @covers \FireflyIII\Http\Controllers\Popup\ReportController::balanceAmount*/- public function testBalanceAmountDiffRole()+ public function testBalanceAmountDiffRole(): void{$categoryRepos = $this->mock(CategoryRepositoryInterface::class);$accountRepos = $this->mock(AccountRepositoryInterface::class);@@ -216,7 +216,7 @@ class ReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Popup\ReportController::balanceAmount* @expectedExceptionMessage Firefly cannot handle this type of info-button*/- public function testBalanceAmountTagRole()+ public function testBalanceAmountTagRole(): void{$categoryRepos = $this->mock(CategoryRepositoryInterface::class);$accountRepos = $this->mock(AccountRepositoryInterface::class);@@ -251,7 +251,7 @@ class ReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Popup\ReportController::parseAttributes* @covers \FireflyIII\Http\Controllers\Popup\ReportController::budgetSpentAmount()*/- public function testBudgetSpentAmount()+ public function testBudgetSpentAmount(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$categoryRepos = $this->mock(CategoryRepositoryInterface::class);@@ -284,7 +284,7 @@ class ReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Popup\ReportController::parseAttributes* @covers \FireflyIII\Http\Controllers\Popup\ReportController::categoryEntry()*/- public function testCategoryEntry()+ public function testCategoryEntry(): void{$budgetRepos = $this->mock(BudgetRepositoryInterface::class);$accountRepos = $this->mock(AccountRepositoryInterface::class);@@ -317,7 +317,7 @@ class ReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Popup\ReportController::parseAttributes* @covers \FireflyIII\Http\Controllers\Popup\ReportController::expenseEntry()*/- public function testExpenseEntry()+ public function testExpenseEntry(): void{$budgetRepos = $this->mock(BudgetRepositoryInterface::class);$accountRepos = $this->mock(AccountRepositoryInterface::class);@@ -351,7 +351,7 @@ class ReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Popup\ReportController::parseAttributes* @covers \FireflyIII\Http\Controllers\Popup\ReportController::incomeEntry()*/- public function testIncomeEntry()+ public function testIncomeEntry(): void{$budgetRepos = $this->mock(BudgetRepositoryInterface::class);$accountRepos = $this->mock(AccountRepositoryInterface::class);@@ -385,7 +385,7 @@ class ReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Popup\ReportController::parseAttributes* @expectedExceptionMessage Firefly cannot handle*/- public function testWrongLocation()+ public function testWrongLocation(): void{$this->be($this->user());$arguments = [diff --git a/tests/Feature/Controllers/PreferencesControllerTest.php b/tests/Feature/Controllers/PreferencesControllerTest.phpindex b0843e8e1e..949166092e 100644--- a/tests/Feature/Controllers/PreferencesControllerTest.php+++ b/tests/Feature/Controllers/PreferencesControllerTest.php@@ -30,7 +30,7 @@ use FireflyIII\Repositories\User\UserRepositoryInterface;use Illuminate\Support\Collection;use Log;use Tests\TestCase;-use Preferences;+/*** Class PreferencesControllerTest*@@ -54,7 +54,7 @@ class PreferencesControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\PreferencesController::index* @covers \FireflyIII\Http\Controllers\PreferencesController::__construct*/- public function testIndex()+ public function testIndex(): void{// mock stuff$accountRepos = $this->mock(AccountRepositoryInterface::class);@@ -71,7 +71,7 @@ class PreferencesControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\PreferencesController::postIndex*/- public function testPostIndex()+ public function testPostIndex(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);diff --git a/tests/Feature/Controllers/ProfileControllerTest.php b/tests/Feature/Controllers/ProfileControllerTest.phpindex d2abd0004e..8530e1f825 100644--- a/tests/Feature/Controllers/ProfileControllerTest.php+++ b/tests/Feature/Controllers/ProfileControllerTest.php@@ -54,7 +54,7 @@ class ProfileControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\ProfileController::changeEmail()*/- public function testChangeEmail()+ public function testChangeEmail(): void{$this->be($this->user());$response = $this->get(route('profile.change-email'));@@ -65,7 +65,7 @@ class ProfileControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\ProfileController::changePassword*/- public function testChangePassword()+ public function testChangePassword(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -81,7 +81,7 @@ class ProfileControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\ProfileController::code* @covers \FireflyIII\Http\Controllers\ProfileController::getDomain*/- public function testCode()+ public function testCode(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -99,7 +99,7 @@ class ProfileControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\ProfileController::confirmEmailChange()* @expectedExceptionMessage Invalid token*/- public function testConfirmEmailChangeNoToken()+ public function testConfirmEmailChangeNoToken(): void{Preferences::shouldReceive('findByName')->withArgs(['email_change_confirm_token'])->andReturn(new Collection());// email_change_confirm_token@@ -110,7 +110,7 @@ class ProfileControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\ProfileController::confirmEmailChange()*/- public function testConfirmEmailWithToken()+ public function testConfirmEmailWithToken(): void{$repository = $this->mock(UserRepositoryInterface::class);$repository->shouldReceive('unblockUser');@@ -128,7 +128,7 @@ class ProfileControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\ProfileController::deleteAccount*/- public function testDeleteAccount()+ public function testDeleteAccount(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -143,7 +143,7 @@ class ProfileControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\ProfileController::deleteCode*/- public function testDeleteCode()+ public function testDeleteCode(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -161,7 +161,7 @@ class ProfileControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\ProfileController::index* @covers \FireflyIII\Http\Controllers\ProfileController::__construct*/- public function testIndex()+ public function testIndex(): void{// delete access token.Preference::where('user_id', $this->user()->id)->where('name', 'access_token')->delete();@@ -178,7 +178,7 @@ class ProfileControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\ProfileController::postChangeEmail*/- public function testPostChangeEmail()+ public function testPostChangeEmail(): void{$data = ['email' => '[email protected]',@@ -197,7 +197,7 @@ class ProfileControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\ProfileController::postChangeEmail*/- public function testPostChangeEmailExisting()+ public function testPostChangeEmailExisting(): void{$data = [@@ -216,7 +216,7 @@ class ProfileControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\ProfileController::postChangeEmail*/- public function testPostChangeEmailSame()+ public function testPostChangeEmailSame(): void{$repository = $this->mock(UserRepositoryInterface::class);$data = [@@ -233,7 +233,7 @@ class ProfileControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\ProfileController::postChangePassword* @covers \FireflyIII\Http\Controllers\ProfileController::validatePassword*/- public function testPostChangePassword()+ public function testPostChangePassword(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -256,7 +256,7 @@ class ProfileControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\ProfileController::postChangePassword* @covers \FireflyIII\Http\Controllers\ProfileController::validatePassword*/- public function testPostChangePasswordNotCorrect()+ public function testPostChangePasswordNotCorrect(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -279,7 +279,7 @@ class ProfileControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\ProfileController::postChangePassword* @covers \FireflyIII\Http\Controllers\ProfileController::validatePassword*/- public function testPostChangePasswordSameNew()+ public function testPostChangePasswordSameNew(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -301,7 +301,7 @@ class ProfileControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\ProfileController::postCode*/- public function testPostCode()+ public function testPostCode(): void{$secret = '0123456789abcde';$key = '123456';@@ -328,7 +328,7 @@ class ProfileControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\ProfileController::postDeleteAccount*/- public function testPostDeleteAccount()+ public function testPostDeleteAccount(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -347,7 +347,7 @@ class ProfileControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\ProfileController::postDeleteAccount*/- public function testPostDeleteAccountWrong()+ public function testPostDeleteAccountWrong(): void{// mock stuff$repository = $this->mock(UserRepositoryInterface::class);@@ -366,7 +366,7 @@ class ProfileControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\ProfileController::regenerate()*/- public function testRegenerate()+ public function testRegenerate(): void{$token = '';$currentToken = Preference::where('user_id', $this->user()->id)->where('name', 'access_token')->first();@@ -391,7 +391,7 @@ class ProfileControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\ProfileController::undoEmailChange()*/- public function testUndoEmailChange()+ public function testUndoEmailChange(): void{$hash = hash('sha256', '[email protected]');$tokenPreference = new Preference;@@ -421,7 +421,7 @@ class ProfileControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\ProfileController::undoEmailChange()* @expectedExceptionMessage Invalid token*/- public function testUndoEmailChangeBadHash()+ public function testUndoEmailChangeBadHash(): void{$repository = $this->mock(UserRepositoryInterface::class);$hash = hash('sha256', '[email protected]');@@ -446,7 +446,7 @@ class ProfileControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\ProfileController::undoEmailChange()* @expectedExceptionMessage Invalid token*/- public function testUndoEmailChangeBadToken()+ public function testUndoEmailChangeBadToken(): void{$repository = $this->mock(UserRepositoryInterface::class);Preferences::shouldReceive('findByName')->once()->andReturn(new Collection);diff --git a/tests/Feature/Controllers/Report/AccountControllerTest.php b/tests/Feature/Controllers/Report/AccountControllerTest.phpindex 986988fd4e..05257e1d05 100644--- a/tests/Feature/Controllers/Report/AccountControllerTest.php+++ b/tests/Feature/Controllers/Report/AccountControllerTest.php@@ -47,7 +47,7 @@ class AccountControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Report\AccountController::general*/- public function testGeneral()+ public function testGeneral(): void{$return = ['accounts' => [],diff --git a/tests/Feature/Controllers/Report/BalanceControllerTest.php b/tests/Feature/Controllers/Report/BalanceControllerTest.phpindex 22a9fc0d8d..48dfed96c8 100644--- a/tests/Feature/Controllers/Report/BalanceControllerTest.php+++ b/tests/Feature/Controllers/Report/BalanceControllerTest.php@@ -49,7 +49,7 @@ class BalanceControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Report\BalanceController::general*/- public function testGeneral()+ public function testGeneral(): void{$balance = $this->mock(BalanceReportHelperInterface::class);$balance->shouldReceive('getBalanceReport')->andReturn(new Balance);diff --git a/tests/Feature/Controllers/Report/BudgetControllerTest.php b/tests/Feature/Controllers/Report/BudgetControllerTest.phpindex 0fd062528c..d82bd24270 100644--- a/tests/Feature/Controllers/Report/BudgetControllerTest.php+++ b/tests/Feature/Controllers/Report/BudgetControllerTest.php@@ -50,7 +50,7 @@ class BudgetControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Report\BudgetController::general*/- public function testGeneral()+ public function testGeneral(): void{$return = [];$helper = $this->mock(BudgetReportHelperInterface::class);@@ -65,7 +65,7 @@ class BudgetControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Report\BudgetController::period* @covers \FireflyIII\Http\Controllers\Report\BudgetController::filterBudgetPeriodReport*/- public function testPeriod()+ public function testPeriod(): void{$first = [1 => ['entries' => ['1', '1']]];$second = ['entries' => ['1', '1']];diff --git a/tests/Feature/Controllers/Report/CategoryControllerTest.php b/tests/Feature/Controllers/Report/CategoryControllerTest.phpindex 5c5a25ece5..8d95399c20 100644--- a/tests/Feature/Controllers/Report/CategoryControllerTest.php+++ b/tests/Feature/Controllers/Report/CategoryControllerTest.php@@ -51,7 +51,7 @@ class CategoryControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Report\CategoryController::expenses* @covers \FireflyIII\Http\Controllers\Report\CategoryController::filterReport*/- public function testExpenses()+ public function testExpenses(): void{$first = [1 => ['entries' => ['1', '1']]];$second = ['entries' => ['1', '1']];@@ -69,7 +69,7 @@ class CategoryControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Report\CategoryController::income* @covers \FireflyIII\Http\Controllers\Report\CategoryController::filterReport*/- public function testIncome()+ public function testIncome(): void{$first = [1 => ['entries' => ['1', '1']]];$second = ['entries' => ['1', '1']];@@ -86,7 +86,7 @@ class CategoryControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Report\CategoryController::operations*/- public function testOperations()+ public function testOperations(): void{$repository = $this->mock(CategoryRepositoryInterface::class);$category = factory(Category::class)->make();diff --git a/tests/Feature/Controllers/Report/ExpenseControllerTest.php b/tests/Feature/Controllers/Report/ExpenseControllerTest.phpindex dcec1cb901..c2b25ff12a 100644--- a/tests/Feature/Controllers/Report/ExpenseControllerTest.php+++ b/tests/Feature/Controllers/Report/ExpenseControllerTest.php@@ -55,7 +55,7 @@ class ExpenseControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Report\ExpenseController::combineAccounts* @covers \FireflyIII\Http\Controllers\Report\ExpenseController::spentByBudget*/- public function testBudget()+ public function testBudget(): void{$expense = $this->user()->accounts()->where('account_type_id', 4)->first();$revenue = $this->user()->accounts()->where('account_type_id', 5)->first();@@ -103,7 +103,7 @@ class ExpenseControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Report\ExpenseController::spentByCategory* @covers \FireflyIII\Http\Controllers\Report\ExpenseController::earnedByCategory*/- public function testCategory()+ public function testCategory(): void{$expense = $this->user()->accounts()->where('account_type_id', 4)->first();$revenue = $this->user()->accounts()->where('account_type_id', 5)->first();@@ -160,7 +160,7 @@ class ExpenseControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Report\ExpenseController::spentInPeriod* @covers \FireflyIII\Http\Controllers\Report\ExpenseController::earnedInPeriod*/- public function testSpent()+ public function testSpent(): void{$expense = $this->user()->accounts()->where('account_type_id', 4)->first();$revenue = $this->user()->accounts()->where('account_type_id', 5)->first();@@ -204,7 +204,7 @@ class ExpenseControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Report\ExpenseController::topExpense*/- public function testTopExpense()+ public function testTopExpense(): void{$expense = $this->user()->accounts()->where('account_type_id', 4)->first();$revenue = $this->user()->accounts()->where('account_type_id', 5)->first();@@ -250,7 +250,7 @@ class ExpenseControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Report\ExpenseController::topIncome*/- public function testTopIncome()+ public function testTopIncome(): void{$expense = $this->user()->accounts()->where('account_type_id', 4)->first();$revenue = $this->user()->accounts()->where('account_type_id', 5)->first();diff --git a/tests/Feature/Controllers/Report/OperationsControllerTest.php b/tests/Feature/Controllers/Report/OperationsControllerTest.phpindex a6c7c959fc..dbb4eba103 100644--- a/tests/Feature/Controllers/Report/OperationsControllerTest.php+++ b/tests/Feature/Controllers/Report/OperationsControllerTest.php@@ -48,7 +48,7 @@ class OperationsControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Report\OperationsController::expenses*/- public function testExpenses()+ public function testExpenses(): void{$return = [1 => [@@ -70,7 +70,7 @@ class OperationsControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Report\OperationsController::income*/- public function testIncome()+ public function testIncome(): void{$tasker = $this->mock(AccountTaskerInterface::class);$tasker->shouldReceive('getIncomeReport')->andReturn([]);@@ -83,7 +83,7 @@ class OperationsControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Report\OperationsController::operations*/- public function testOperations()+ public function testOperations(): void{$return = [1 => [diff --git a/tests/Feature/Controllers/ReportControllerTest.php b/tests/Feature/Controllers/ReportControllerTest.phpindex 2aa4bbebf1..45b98ac2a1 100644--- a/tests/Feature/Controllers/ReportControllerTest.php+++ b/tests/Feature/Controllers/ReportControllerTest.php@@ -66,7 +66,7 @@ class ReportControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\ReportController::accountReport()*/- public function testAccountReport()+ public function testAccountReport(): void{$budgetRepository = $this->mock(BudgetRepositoryInterface::class);$budgetRepository->shouldReceive('cleanupBudgets');@@ -90,7 +90,7 @@ class ReportControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\ReportController::auditReport*/- public function testAuditReport()+ public function testAuditReport(): void{$budgetRepository = $this->mock(BudgetRepositoryInterface::class);$budgetRepository->shouldReceive('cleanupBudgets');@@ -112,7 +112,7 @@ class ReportControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\ReportController::budgetReport*/- public function testBudgetReport()+ public function testBudgetReport(): void{$budgetRepository = $this->mock(BudgetRepositoryInterface::class);$budgetRepository->shouldReceive('cleanupBudgets');@@ -134,7 +134,7 @@ class ReportControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\ReportController::categoryReport*/- public function testCategoryReport()+ public function testCategoryReport(): void{$budgetRepository = $this->mock(BudgetRepositoryInterface::class);$budgetRepository->shouldReceive('cleanupBudgets');@@ -156,7 +156,7 @@ class ReportControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\ReportController::defaultReport*/- public function testDefaultReport()+ public function testDefaultReport(): void{$budgetRepository = $this->mock(BudgetRepositoryInterface::class);$budgetRepository->shouldReceive('cleanupBudgets');@@ -177,7 +177,7 @@ class ReportControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\ReportController::defaultReport*/- public function testDefaultReportBadDate()+ public function testDefaultReportBadDate(): void{$budgetRepository = $this->mock(BudgetRepositoryInterface::class);$budgetRepository->shouldReceive('cleanupBudgets');@@ -195,7 +195,7 @@ class ReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\ReportController::index* @covers \FireflyIII\Http\Controllers\ReportController::__construct*/- public function testIndex()+ public function testIndex(): void{$budgetRepository = $this->mock(BudgetRepositoryInterface::class);$budgetRepository->shouldReceive('cleanupBudgets');@@ -217,7 +217,7 @@ class ReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\ReportController::options* @covers \FireflyIII\Http\Controllers\ReportController::noReportOptions*/- public function testOptions()+ public function testOptions(): void{$budgetRepository = $this->mock(BudgetRepositoryInterface::class);@@ -233,7 +233,7 @@ class ReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\ReportController::options* @covers \FireflyIII\Http\Controllers\ReportController::accountReportOptions()*/- public function testOptionsAccount()+ public function testOptionsAccount(): void{$budgetRepository = $this->mock(BudgetRepositoryInterface::class);@@ -257,7 +257,7 @@ class ReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\ReportController::options* @covers \FireflyIII\Http\Controllers\ReportController::budgetReportOptions*/- public function testOptionsBudget()+ public function testOptionsBudget(): void{$budgetRepository = $this->mock(BudgetRepositoryInterface::class);@@ -277,7 +277,7 @@ class ReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\ReportController::options* @covers \FireflyIII\Http\Controllers\ReportController::categoryReportOptions*/- public function testOptionsCategory()+ public function testOptionsCategory(): void{$budgetRepository = $this->mock(BudgetRepositoryInterface::class);@@ -296,7 +296,7 @@ class ReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\ReportController::options* @covers \FireflyIII\Http\Controllers\ReportController::tagReportOptions*/- public function testOptionsTag()+ public function testOptionsTag(): void{$budgetRepository = $this->mock(BudgetRepositoryInterface::class);@@ -315,7 +315,7 @@ class ReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\ReportController::postIndex* @covers \FireflyIII\Http\Requests\ReportFormRequest*/- public function testPostIndexAccountOK()+ public function testPostIndexAccountOK(): void{$budgetRepository = $this->mock(BudgetRepositoryInterface::class);$accountRepos = $this->mock(AccountRepositoryInterface::class);@@ -342,7 +342,7 @@ class ReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\ReportController::postIndex* @covers \FireflyIII\Http\Requests\ReportFormRequest*/- public function testPostIndexAuditOK()+ public function testPostIndexAuditOK(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$budgetRepository = $this->mock(BudgetRepositoryInterface::class);@@ -368,7 +368,7 @@ class ReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\ReportController::postIndex* @covers \FireflyIII\Http\Requests\ReportFormRequest*/- public function testPostIndexBudgetError()+ public function testPostIndexBudgetError(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$budgetRepository = $this->mock(BudgetRepositoryInterface::class);@@ -397,7 +397,7 @@ class ReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\ReportController::postIndex* @covers \FireflyIII\Http\Requests\ReportFormRequest*/- public function testPostIndexBudgetOK()+ public function testPostIndexBudgetOK(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$budgetRepository = $this->mock(BudgetRepositoryInterface::class);@@ -426,7 +426,7 @@ class ReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\ReportController::postIndex* @covers \FireflyIII\Http\Requests\ReportFormRequest*/- public function testPostIndexCategoryError()+ public function testPostIndexCategoryError(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$budgetRepository = $this->mock(BudgetRepositoryInterface::class);@@ -455,7 +455,7 @@ class ReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\ReportController::postIndex* @covers \FireflyIII\Http\Requests\ReportFormRequest*/- public function testPostIndexCategoryOK()+ public function testPostIndexCategoryOK(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$budgetRepository = $this->mock(BudgetRepositoryInterface::class);@@ -483,7 +483,7 @@ class ReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\ReportController::postIndex* @covers \FireflyIII\Http\Requests\ReportFormRequest*/- public function testPostIndexDefaultOK()+ public function testPostIndexDefaultOK(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$budgetRepository = $this->mock(BudgetRepositoryInterface::class);@@ -509,7 +509,7 @@ class ReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\ReportController::postIndex* @covers \FireflyIII\Http\Requests\ReportFormRequest*/- public function testPostIndexDefaultStartEnd()+ public function testPostIndexDefaultStartEnd(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$budgetRepository = $this->mock(BudgetRepositoryInterface::class);@@ -535,7 +535,7 @@ class ReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\ReportController::postIndex* @covers \FireflyIII\Http\Requests\ReportFormRequest*/- public function testPostIndexTagError()+ public function testPostIndexTagError(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$budgetRepository = $this->mock(BudgetRepositoryInterface::class);@@ -563,7 +563,7 @@ class ReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\ReportController::postIndex* @covers \FireflyIII\Http\Requests\ReportFormRequest*/- public function testPostIndexTagOK()+ public function testPostIndexTagOK(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$budgetRepository = $this->mock(BudgetRepositoryInterface::class);@@ -592,7 +592,7 @@ class ReportControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\ReportController::postIndex* @covers \FireflyIII\Http\Requests\ReportFormRequest*/- public function testPostIndexZeroAccounts()+ public function testPostIndexZeroAccounts(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$budgetRepository = $this->mock(BudgetRepositoryInterface::class);@@ -617,7 +617,7 @@ class ReportControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\ReportController::tagReport*/- public function testTagReport()+ public function testTagReport(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$budgetRepository = $this->mock(BudgetRepositoryInterface::class);diff --git a/tests/Feature/Controllers/RuleControllerTest.php b/tests/Feature/Controllers/RuleControllerTest.phpindex f47903bd3a..b6e1926fd2 100644--- a/tests/Feature/Controllers/RuleControllerTest.php+++ b/tests/Feature/Controllers/RuleControllerTest.php@@ -60,7 +60,7 @@ class RuleControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\RuleController::create*/- public function testCreate()+ public function testCreate(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -77,7 +77,7 @@ class RuleControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\RuleController::getPreviousTriggers* @covers \FireflyIII\Http\Controllers\RuleController::getPreviousActions*/- public function testCreatePreviousInput()+ public function testCreatePreviousInput(): void{$old = ['rule-trigger' => ['description_is'],@@ -102,7 +102,7 @@ class RuleControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\RuleController::delete*/- public function testDelete()+ public function testDelete(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -117,7 +117,7 @@ class RuleControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\RuleController::destroy*/- public function testDestroy()+ public function testDestroy(): void{// mock stuff$repository = $this->mock(RuleRepositoryInterface::class);@@ -136,7 +136,7 @@ class RuleControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\RuleController::down*/- public function testDown()+ public function testDown(): void{// mock stuff$repository = $this->mock(RuleRepositoryInterface::class);@@ -155,7 +155,7 @@ class RuleControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\RuleController::getCurrentActions* @covers \FireflyIII\Http\Controllers\RuleController::getCurrentTriggers*/- public function testEdit()+ public function testEdit(): void{// mock stuff$groupRepos = $this->mock(RuleGroupRepositoryInterface::class);@@ -176,7 +176,7 @@ class RuleControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\RuleController::getPreviousActions* @covers \FireflyIII\Http\Controllers\RuleController::getPreviousTriggers*/- public function testEditPreviousInput()+ public function testEditPreviousInput(): void{$old = ['rule-trigger' => ['description_is'],@@ -205,7 +205,7 @@ class RuleControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\RuleController::execute*/- public function testExecute()+ public function testExecute(): void{$account = $this->user()->accounts()->find(1);$accountRepos = $this->mock(AccountRepositoryInterface::class);@@ -238,7 +238,7 @@ class RuleControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\RuleController::createDefaultRule* @covers \FireflyIII\Http\Controllers\RuleController::createDefaultRuleGroup*/- public function testIndex()+ public function testIndex(): void{// mock stuff$repository = $this->mock(RuleRepositoryInterface::class);@@ -261,7 +261,7 @@ class RuleControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\RuleController::reorderRuleActions*/- public function testReorderRuleActions()+ public function testReorderRuleActions(): void{// mock stuff$repository = $this->mock(RuleRepositoryInterface::class);@@ -279,7 +279,7 @@ class RuleControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\RuleController::reorderRuleTriggers*/- public function testReorderRuleTriggers()+ public function testReorderRuleTriggers(): void{// mock stuff$repository = $this->mock(RuleRepositoryInterface::class);@@ -297,7 +297,7 @@ class RuleControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\RuleController::selectTransactions()*/- public function testSelectTransactions()+ public function testSelectTransactions(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$accountRepos->shouldReceive('getAccountsByType')->andReturn(new Collection);@@ -312,7 +312,7 @@ class RuleControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\RuleController::store* @covers \FireflyIII\Http\Requests\RuleFormRequest*/- public function testStore()+ public function testStore(): void{// mock stuff$repository = $this->mock(RuleRepositoryInterface::class);@@ -352,7 +352,7 @@ class RuleControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\RuleController::testTriggers* @covers \FireflyIII\Http\Controllers\RuleController::getValidTriggerList*/- public function testTestTriggers()+ public function testTestTriggers(): void{$data = ['rule-trigger' => ['description_is'],@@ -379,7 +379,7 @@ class RuleControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\RuleController::testTriggersByRule()*/- public function testTestTriggersByRule()+ public function testTestTriggersByRule(): void{$matcher = $this->mock(TransactionMatcher::class);@@ -401,7 +401,7 @@ class RuleControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\RuleController::testTriggers* @covers \FireflyIII\Http\Controllers\RuleController::getValidTriggerList*/- public function testTestTriggersError()+ public function testTestTriggersError(): void{$journalRepos = $this->mock(JournalRepositoryInterface::class);$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);@@ -416,7 +416,7 @@ class RuleControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\RuleController::testTriggers* @covers \FireflyIII\Http\Controllers\RuleController::getValidTriggerList*/- public function testTestTriggersMax()+ public function testTestTriggersMax(): void{$data = ['rule-trigger' => ['description_is'],@@ -444,7 +444,7 @@ class RuleControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\RuleController::up*/- public function testUp()+ public function testUp(): void{// mock stuff$repository = $this->mock(RuleRepositoryInterface::class);@@ -462,7 +462,7 @@ class RuleControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\RuleController::update* @covers \FireflyIII\Http\Requests\RuleFormRequest*/- public function testUpdate()+ public function testUpdate(): void{// mock stuff$repository = $this->mock(RuleRepositoryInterface::class);diff --git a/tests/Feature/Controllers/RuleGroupControllerTest.php b/tests/Feature/Controllers/RuleGroupControllerTest.phpindex 135b405f19..80f30a6531 100644--- a/tests/Feature/Controllers/RuleGroupControllerTest.php+++ b/tests/Feature/Controllers/RuleGroupControllerTest.php@@ -56,7 +56,7 @@ class RuleGroupControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\RuleGroupController::create* @covers \FireflyIII\Http\Controllers\RuleGroupController::__construct*/- public function testCreate()+ public function testCreate(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -71,7 +71,7 @@ class RuleGroupControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\RuleGroupController::delete*/- public function testDelete()+ public function testDelete(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -88,7 +88,7 @@ class RuleGroupControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\RuleGroupController::destroy*/- public function testDestroy()+ public function testDestroy(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -107,7 +107,7 @@ class RuleGroupControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\RuleGroupController::down*/- public function testDown()+ public function testDown(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -124,7 +124,7 @@ class RuleGroupControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\RuleGroupController::edit*/- public function testEdit()+ public function testEdit(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -139,7 +139,7 @@ class RuleGroupControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\RuleGroupController::execute*/- public function testExecute()+ public function testExecute(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -166,7 +166,7 @@ class RuleGroupControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\RuleGroupController::selectTransactions* @covers \FireflyIII\Http\Controllers\RuleGroupController::__construct*/- public function testSelectTransactions()+ public function testSelectTransactions(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -184,7 +184,7 @@ class RuleGroupControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\RuleGroupController::store* @covers \FireflyIII\Http\Requests\RuleGroupFormRequest*/- public function testStore()+ public function testStore(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -208,7 +208,7 @@ class RuleGroupControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\RuleGroupController::up*/- public function testUp()+ public function testUp(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -226,7 +226,7 @@ class RuleGroupControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\RuleGroupController::update* @covers \FireflyIII\Http\Requests\RuleGroupFormRequest*/- public function testUpdate()+ public function testUpdate(): void{// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);diff --git a/tests/Feature/Controllers/SearchControllerTest.php b/tests/Feature/Controllers/SearchControllerTest.phpindex fac6dedc78..8d2a75b687 100644--- a/tests/Feature/Controllers/SearchControllerTest.php+++ b/tests/Feature/Controllers/SearchControllerTest.php@@ -50,7 +50,7 @@ class SearchControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\SearchController::index* @covers \FireflyIII\Http\Controllers\SearchController::__construct*/- public function testIndex()+ public function testIndex(): void{$search = $this->mock(SearchInterface::class);$search->shouldReceive('parseQuery')->once();@@ -65,7 +65,7 @@ class SearchControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\SearchController::search* @covers \FireflyIII\Http\Controllers\SearchController::__construct*/- public function testSearch()+ public function testSearch(): void{$search = $this->mock(SearchInterface::class);$search->shouldReceive('parseQuery')->once();diff --git a/tests/Feature/Controllers/TagControllerTest.php b/tests/Feature/Controllers/TagControllerTest.phpindex 4b22d58a18..29fbf5046f 100644--- a/tests/Feature/Controllers/TagControllerTest.php+++ b/tests/Feature/Controllers/TagControllerTest.php@@ -55,7 +55,7 @@ class TagControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\TagController::create*/- public function testCreate()+ public function testCreate(): void{// mock stuff$tagRepos = $this->mock(TagRepositoryInterface::class);@@ -71,7 +71,7 @@ class TagControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\TagController::delete*/- public function testDelete()+ public function testDelete(): void{// mock stuff$tagRepos = $this->mock(TagRepositoryInterface::class);@@ -87,7 +87,7 @@ class TagControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\TagController::destroy*/- public function testDestroy()+ public function testDestroy(): void{// mock stuff$repository = $this->mock(TagRepositoryInterface::class);@@ -104,7 +104,7 @@ class TagControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\TagController::edit*/- public function testEdit()+ public function testEdit(): void{// mock stuff$tagRepos = $this->mock(TagRepositoryInterface::class);@@ -121,7 +121,7 @@ class TagControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\TagController::index* @covers \FireflyIII\Http\Controllers\TagController::__construct*/- public function testIndex()+ public function testIndex(): void{// mock stuff$repository = $this->mock(TagRepositoryInterface::class);@@ -141,7 +141,7 @@ class TagControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\TagController::show* @covers \FireflyIII\Http\Controllers\TagController::getPeriodOverview*/- public function testShow()+ public function testShow(): void{$amounts = [TransactionType::WITHDRAWAL => '0',@@ -180,7 +180,7 @@ class TagControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\TagController::show*/- public function testShowAll()+ public function testShowAll(): void{// mock stuff$repository = $this->mock(TagRepositoryInterface::class);@@ -216,7 +216,7 @@ class TagControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\TagController::show*/- public function testShowDate()+ public function testShowDate(): void{// mock stuff$repository = $this->mock(TagRepositoryInterface::class);@@ -256,7 +256,7 @@ class TagControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\TagController::store* @covers \FireflyIII\Http\Requests\TagFormRequest*/- public function testStore()+ public function testStore(): void{// mock stuff$repository = $this->mock(TagRepositoryInterface::class);@@ -282,7 +282,7 @@ class TagControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\TagController::update* @covers \FireflyIII\Http\Requests\TagFormRequest*/- public function testUpdate()+ public function testUpdate(): void{// mock stuff$repository = $this->mock(TagRepositoryInterface::class);diff --git a/tests/Feature/Controllers/Transaction/BulkControllerTest.php b/tests/Feature/Controllers/Transaction/BulkControllerTest.phpindex 700c55b57a..608e3944a3 100644--- a/tests/Feature/Controllers/Transaction/BulkControllerTest.php+++ b/tests/Feature/Controllers/Transaction/BulkControllerTest.php@@ -53,7 +53,7 @@ class BulkControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\BulkController::edit* @covers \FireflyIII\Http\Controllers\Transaction\BulkController::__construct*/- public function testEdit()+ public function testEdit(): void{// mock stuff:$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -78,7 +78,7 @@ class BulkControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Transaction\BulkController::edit*/- public function testEditMultiple()+ public function testEditMultiple(): void{// mock stuff:$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -114,7 +114,7 @@ class BulkControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\BulkController::update* @covers \FireflyIII\Http\Requests\BulkEditJournalRequest*/- public function testUpdate()+ public function testUpdate(): void{$tags = ['a', 'b', 'c'];$collection = TransactionJournal::where('transaction_type_id', 1)->where('user_id', $this->user()->id)->take(4)->get();diff --git a/tests/Feature/Controllers/Transaction/ConvertControllerTest.php b/tests/Feature/Controllers/Transaction/ConvertControllerTest.phpindex c68d139478..98b31601a9 100644--- a/tests/Feature/Controllers/Transaction/ConvertControllerTest.php+++ b/tests/Feature/Controllers/Transaction/ConvertControllerTest.php@@ -59,7 +59,7 @@ class ConvertControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\ConvertController::index* @covers \FireflyIII\Http\Controllers\Transaction\ConvertController::__construct*/- public function testIndexDepositTransfer()+ public function testIndexDepositTransfer(): void{// mock stuff:$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -92,7 +92,7 @@ class ConvertControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Transaction\ConvertController::index*/- public function testIndexDepositWithdrawal()+ public function testIndexDepositWithdrawal(): void{// mock stuff:$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -117,7 +117,7 @@ class ConvertControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Transaction\ConvertController::index*/- public function testIndexSameType()+ public function testIndexSameType(): void{// mock stuff:$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -134,7 +134,7 @@ class ConvertControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Transaction\ConvertController::index*/- public function testIndexSplit()+ public function testIndexSplit(): void{// mock stuff:$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -163,7 +163,7 @@ class ConvertControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Transaction\ConvertController::index*/- public function testIndexTransferDeposit()+ public function testIndexTransferDeposit(): void{// mock stuff:$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -183,7 +183,7 @@ class ConvertControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Transaction\ConvertController::index*/- public function testIndexTransferWithdrawal()+ public function testIndexTransferWithdrawal(): void{// mock stuff:$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -207,7 +207,7 @@ class ConvertControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Transaction\ConvertController::index*/- public function testIndexWithdrawalDeposit()+ public function testIndexWithdrawalDeposit(): void{// mock stuff:$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -231,7 +231,7 @@ class ConvertControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Transaction\ConvertController::index*/- public function testIndexWithdrawalTransfer()+ public function testIndexWithdrawalTransfer(): void{// mock stuff:$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -264,7 +264,7 @@ class ConvertControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\ConvertController::getSourceAccount* @covers \FireflyIII\Http\Controllers\Transaction\ConvertController::getDestinationAccount*/- public function testPostIndexDepositTransfer()+ public function testPostIndexDepositTransfer(): void{// mock stuff@@ -293,7 +293,7 @@ class ConvertControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\ConvertController::getSourceAccount* @covers \FireflyIII\Http\Controllers\Transaction\ConvertController::getDestinationAccount*/- public function testPostIndexDepositWithdrawal()+ public function testPostIndexDepositWithdrawal(): void{// mock stuff@@ -320,7 +320,7 @@ class ConvertControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\ConvertController::getSourceAccount* @covers \FireflyIII\Http\Controllers\Transaction\ConvertController::getDestinationAccount*/- public function testPostIndexDepositWithdrawalEmptyName()+ public function testPostIndexDepositWithdrawalEmptyName(): void{// mock stuff$repository = $this->mock(JournalRepositoryInterface::class);@@ -348,7 +348,7 @@ class ConvertControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\ConvertController::getSourceAccount* @covers \FireflyIII\Http\Controllers\Transaction\ConvertController::getDestinationAccount*/- public function testPostIndexErrored()+ public function testPostIndexErrored(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$account = $this->user()->accounts()->first();@@ -381,7 +381,7 @@ class ConvertControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\ConvertController::getSourceAccount* @covers \FireflyIII\Http\Controllers\Transaction\ConvertController::getDestinationAccount*/- public function testPostIndexSameType()+ public function testPostIndexSameType(): void{// mock stuff$accountRepos = $this->mock(AccountRepositoryInterface::class);@@ -404,7 +404,7 @@ class ConvertControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\ConvertController::getSourceAccount* @covers \FireflyIII\Http\Controllers\Transaction\ConvertController::getDestinationAccount*/- public function testPostIndexSplit()+ public function testPostIndexSplit(): void{// mock stuff$accountRepos = $this->mock(AccountRepositoryInterface::class);@@ -432,7 +432,7 @@ class ConvertControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\ConvertController::getSourceAccount* @covers \FireflyIII\Http\Controllers\Transaction\ConvertController::getDestinationAccount*/- public function testPostIndexTransferDeposit()+ public function testPostIndexTransferDeposit(): void{// mock stuff$repository = $this->mock(JournalRepositoryInterface::class);@@ -459,7 +459,7 @@ class ConvertControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\ConvertController::getSourceAccount* @covers \FireflyIII\Http\Controllers\Transaction\ConvertController::getDestinationAccount*/- public function testPostIndexWithdrawalDeposit()+ public function testPostIndexWithdrawalDeposit(): void{// mock stuff$repository = $this->mock(JournalRepositoryInterface::class);@@ -486,7 +486,7 @@ class ConvertControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\ConvertController::getSourceAccount* @covers \FireflyIII\Http\Controllers\Transaction\ConvertController::getDestinationAccount*/- public function testPostIndexWithdrawalDepositEmptyName()+ public function testPostIndexWithdrawalDepositEmptyName(): void{// mock stuff$repository = $this->mock(JournalRepositoryInterface::class);@@ -513,7 +513,7 @@ class ConvertControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\ConvertController::getSourceAccount* @covers \FireflyIII\Http\Controllers\Transaction\ConvertController::getDestinationAccount*/- public function testPostIndexWithdrawalTransfer()+ public function testPostIndexWithdrawalTransfer(): void{// mock stuff$repository = $this->mock(JournalRepositoryInterface::class);diff --git a/tests/Feature/Controllers/Transaction/LinkControllerTest.php b/tests/Feature/Controllers/Transaction/LinkControllerTest.phpindex d9e08d550f..4789f3ed8a 100644--- a/tests/Feature/Controllers/Transaction/LinkControllerTest.php+++ b/tests/Feature/Controllers/Transaction/LinkControllerTest.php@@ -49,7 +49,7 @@ class LinkControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\LinkController::__construct* @covers \FireflyIII\Http\Controllers\Transaction\LinkController::delete*/- public function testDelete()+ public function testDelete(): void{$journalRepos = $this->mock(JournalRepositoryInterface::class);$linkRepos = $this->mock(LinkTypeRepositoryInterface::class);@@ -63,7 +63,7 @@ class LinkControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Transaction\LinkController::destroy*/- public function testDestroy()+ public function testDestroy(): void{$journalRepos = $this->mock(JournalRepositoryInterface::class);$repository = $this->mock(LinkTypeRepositoryInterface::class);@@ -85,7 +85,7 @@ class LinkControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\LinkController::store* @covers \FireflyIII\Http\Requests\JournalLinkRequest*/- public function testStore()+ public function testStore(): void{$repository = $this->mock(LinkTypeRepositoryInterface::class);$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -111,7 +111,7 @@ class LinkControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\LinkController::store* @covers \FireflyIII\Http\Requests\JournalLinkRequest*/- public function testStoreAlreadyLinked()+ public function testStoreAlreadyLinked(): void{$repository = $this->mock(LinkTypeRepositoryInterface::class);$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -136,7 +136,7 @@ class LinkControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\LinkController::store* @covers \FireflyIII\Http\Requests\JournalLinkRequest*/- public function testStoreInvalid()+ public function testStoreInvalid(): void{$journalRepos = $this->mock(JournalRepositoryInterface::class);$linkRepos = $this->mock(LinkTypeRepositoryInterface::class);@@ -157,7 +157,7 @@ class LinkControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Transaction\LinkController::switchLink*/- public function testSwitchLink()+ public function testSwitchLink(): void{$journalRepos = $this->mock(JournalRepositoryInterface::class);$repository = $this->mock(LinkTypeRepositoryInterface::class);diff --git a/tests/Feature/Controllers/Transaction/MassControllerTest.php b/tests/Feature/Controllers/Transaction/MassControllerTest.phpindex 826190672a..82ed6bb76d 100644--- a/tests/Feature/Controllers/Transaction/MassControllerTest.php+++ b/tests/Feature/Controllers/Transaction/MassControllerTest.php@@ -54,7 +54,7 @@ class MassControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\MassController::delete* @covers \FireflyIII\Http\Controllers\Transaction\MassController::__construct*/- public function testDelete()+ public function testDelete(): void{$journalRepos = $this->mock(JournalRepositoryInterface::class);$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);@@ -72,7 +72,7 @@ class MassControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Transaction\MassController::destroy*/- public function testDestroy()+ public function testDestroy(): void{$deposits = TransactionJournal::where('transaction_type_id', 2)->where('user_id', $this->user()->id)->take(2)->get();@@ -98,7 +98,7 @@ class MassControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Transaction\MassController::edit*/- public function testEdit()+ public function testEdit(): void{$journalRepos = $this->mock(JournalRepositoryInterface::class);@@ -135,7 +135,7 @@ class MassControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Transaction\MassController::edit*/- public function testEditMultiple()+ public function testEditMultiple(): void{$budgetRepos = $this->mock(BudgetRepositoryInterface::class);$budgetRepos->shouldReceive('getBudgets')->andReturn(new Collection);@@ -178,7 +178,7 @@ class MassControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Transaction\MassController::update*/- public function testUpdate()+ public function testUpdate(): void{$deposit = TransactionJournal::where('transaction_type_id', 2)->where('user_id', $this->user()->id)->whereNull('deleted_at')diff --git a/tests/Feature/Controllers/Transaction/SingleControllerTest.php b/tests/Feature/Controllers/Transaction/SingleControllerTest.phpindex 763e2ba9d6..ea2bafac0d 100644--- a/tests/Feature/Controllers/Transaction/SingleControllerTest.php+++ b/tests/Feature/Controllers/Transaction/SingleControllerTest.php@@ -69,7 +69,7 @@ class SingleControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Transaction\SingleController::cloneTransaction*/- public function testCloneTransaction()+ public function testCloneTransaction(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$budgetRepos = $this->mock(BudgetRepositoryInterface::class);@@ -102,7 +102,7 @@ class SingleControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\SingleController::create* @covers \FireflyIII\Http\Controllers\Transaction\SingleController::__construct*/- public function testCreate()+ public function testCreate(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$budgetRepos = $this->mock(BudgetRepositoryInterface::class);@@ -128,7 +128,7 @@ class SingleControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\SingleController::create* @covers \FireflyIII\Http\Controllers\Transaction\SingleController::__construct*/- public function testCreateDepositWithSource()+ public function testCreateDepositWithSource(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$budgetRepos = $this->mock(BudgetRepositoryInterface::class);@@ -153,7 +153,7 @@ class SingleControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\SingleController::create* @covers \FireflyIII\Http\Controllers\Transaction\SingleController::__construct*/- public function testCreateWithSource()+ public function testCreateWithSource(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$budgetRepos = $this->mock(BudgetRepositoryInterface::class);@@ -177,7 +177,7 @@ class SingleControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Transaction\SingleController::delete*/- public function testDelete()+ public function testDelete(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$budgetRepos = $this->mock(BudgetRepositoryInterface::class);@@ -198,7 +198,7 @@ class SingleControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Transaction\SingleController::destroy*/- public function testDestroy()+ public function testDestroy(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$budgetRepos = $this->mock(BudgetRepositoryInterface::class);@@ -224,7 +224,7 @@ class SingleControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\SingleController::edit* @covers \FireflyIII\Http\Controllers\Transaction\SingleController::isSplitJournal*/- public function testEdit()+ public function testEdit(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$budgetRepos = $this->mock(BudgetRepositoryInterface::class);@@ -266,7 +266,7 @@ class SingleControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Transaction\SingleController::edit*/- public function testEditCashDeposit()+ public function testEditCashDeposit(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$budgetRepos = $this->mock(BudgetRepositoryInterface::class);@@ -312,7 +312,7 @@ class SingleControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Transaction\SingleController::edit*/- public function testEditCashWithdrawal()+ public function testEditCashWithdrawal(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$budgetRepos = $this->mock(BudgetRepositoryInterface::class);@@ -358,7 +358,7 @@ class SingleControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Transaction\SingleController::edit*/- public function testEditReconcile()+ public function testEditReconcile(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$budgetRepos = $this->mock(BudgetRepositoryInterface::class);@@ -384,7 +384,7 @@ class SingleControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Transaction\SingleController::edit*/- public function testEditRedirect()+ public function testEditRedirect(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$budgetRepos = $this->mock(BudgetRepositoryInterface::class);@@ -413,7 +413,7 @@ class SingleControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Transaction\SingleController::edit*/- public function testEditRedirectOpening()+ public function testEditRedirectOpening(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$budgetRepos = $this->mock(BudgetRepositoryInterface::class);@@ -433,7 +433,7 @@ class SingleControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Transaction\SingleController::edit*/- public function testEditTransferWithForeignAmount()+ public function testEditTransferWithForeignAmount(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$budgetRepos = $this->mock(BudgetRepositoryInterface::class);@@ -481,7 +481,7 @@ class SingleControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\SingleController::edit* @covers \FireflyIII\Http\Controllers\Transaction\SingleController::isSplitJournal*/- public function testEditWithForeign()+ public function testEditWithForeign(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$budgetRepos = $this->mock(BudgetRepositoryInterface::class);@@ -522,7 +522,7 @@ class SingleControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Transaction\SingleController::edit*/- public function testEditWithForeignAmount()+ public function testEditWithForeignAmount(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$budgetRepos = $this->mock(BudgetRepositoryInterface::class);@@ -570,7 +570,7 @@ class SingleControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\SingleController::store* @covers \FireflyIII\Http\Requests\JournalFormRequest*/- public function testStoreError()+ public function testStoreError(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);@@ -606,7 +606,7 @@ class SingleControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\SingleController::store* @covers \FireflyIII\Http\Requests\JournalFormRequest*/- public function testStoreSuccess()+ public function testStoreSuccess(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);@@ -622,8 +622,11 @@ class SingleControllerTest extends TestCase$journal->id = 1000;$journal->description = 'New journal';$journalRepos->shouldReceive('store')->andReturn($journal);- $this->expectsEvents(StoredTransactionJournal::class);-+ try {+ $this->expectsEvents(StoredTransactionJournal::class);+ } catch (Exception $e) {+ $this->assertTrue(false, $e->getMessage());+ }$errors = new MessageBag;$errors->add('attachments', 'Fake error');@@ -658,7 +661,7 @@ class SingleControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\SingleController::store* @covers \FireflyIII\Http\Requests\JournalFormRequest*/- public function testStoreSuccessDeposit()+ public function testStoreSuccessDeposit(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);@@ -674,8 +677,11 @@ class SingleControllerTest extends TestCase$journal->id = 1000;$journal->description = 'New deposit';$journalRepos->shouldReceive('store')->andReturn($journal);- $this->expectsEvents(StoredTransactionJournal::class);-+ try {+ $this->expectsEvents(StoredTransactionJournal::class);+ } catch (Exception $e) {+ $this->assertTrue(false, $e->getMessage());+ }$errors = new MessageBag;$errors->add('attachments', 'Fake error');@@ -710,7 +716,7 @@ class SingleControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\SingleController::store* @covers \FireflyIII\Http\Requests\JournalFormRequest*/- public function testStoreSuccessTransfer()+ public function testStoreSuccessTransfer(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);@@ -726,7 +732,11 @@ class SingleControllerTest extends TestCase$journal->id = 1000;$journal->description = 'New transfer';$journalRepos->shouldReceive('store')->andReturn($journal);- $this->expectsEvents(StoredTransactionJournal::class);+ try {+ $this->expectsEvents(StoredTransactionJournal::class);+ } catch (Exception $e) {+ $this->assertTrue(false, $e->getMessage());+ }$errors = new MessageBag;$errors->add('attachments', 'Fake error');@@ -762,7 +772,7 @@ class SingleControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\SingleController::store* @covers \FireflyIII\Http\Requests\JournalFormRequest*/- public function testStoreSuccessTransferForeign()+ public function testStoreSuccessTransferForeign(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);@@ -778,7 +788,11 @@ class SingleControllerTest extends TestCase$journal->id = 1000;$journal->description = 'New transfer';$journalRepos->shouldReceive('store')->andReturn($journal);- $this->expectsEvents(StoredTransactionJournal::class);+ try {+ $this->expectsEvents(StoredTransactionJournal::class);+ } catch (Exception $e) {+ $this->assertTrue(false, $e->getMessage());+ }$errors = new MessageBag;$errors->add('attachments', 'Fake error');@@ -816,7 +830,7 @@ class SingleControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\SingleController::update* @covers \FireflyIII\Http\Requests\JournalFormRequest*/- public function testUpdate()+ public function testUpdate(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$budgetRepos = $this->mock(BudgetRepositoryInterface::class);@@ -841,7 +855,7 @@ class SingleControllerTest extends TestCasetry {$this->expectsEvents(UpdatedTransactionJournal::class);} catch (Exception $e) {- $this->assertTrue(false, 'expectsEvents failed!');+ $this->assertTrue(false, $e->getMessage());}$journal = new TransactionJournal();diff --git a/tests/Feature/Controllers/Transaction/SplitControllerTest.php b/tests/Feature/Controllers/Transaction/SplitControllerTest.phpindex 1abc029112..785eeae4e9 100644--- a/tests/Feature/Controllers/Transaction/SplitControllerTest.php+++ b/tests/Feature/Controllers/Transaction/SplitControllerTest.php@@ -65,7 +65,7 @@ class SplitControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\SplitController::updateWithPrevious* @covers \FireflyIII\Http\Controllers\Transaction\SplitController::getTransactionDataFromJournal*/- public function testEdit()+ public function testEdit(): void{$currencyRepository = $this->mock(CurrencyRepositoryInterface::class);$accountRepos = $this->mock(AccountRepositoryInterface::class);@@ -118,7 +118,7 @@ class SplitControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\SplitController::updateWithPrevious* @covers \FireflyIII\Http\Controllers\Transaction\SplitController::getTransactionDataFromJournal*/- public function testEditOldInput()+ public function testEditOldInput(): void{$currencyRepository = $this->mock(CurrencyRepositoryInterface::class);$accountRepos = $this->mock(AccountRepositoryInterface::class);@@ -218,7 +218,7 @@ class SplitControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\Transaction\SplitController::edit*/- public function testEditOpeningBalance()+ public function testEditOpeningBalance(): void{$currencyRepository = $this->mock(CurrencyRepositoryInterface::class);$accountRepository = $this->mock(AccountRepositoryInterface::class);@@ -240,7 +240,7 @@ class SplitControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\SplitController::updateWithPrevious* @covers \FireflyIII\Http\Controllers\Transaction\SplitController::getTransactionDataFromJournal*/- public function testEditSingle()+ public function testEditSingle(): void{$currencyRepository = $this->mock(CurrencyRepositoryInterface::class);$accountRepository = $this->mock(AccountRepositoryInterface::class);@@ -285,7 +285,7 @@ class SplitControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\SplitController::update* @covers \FireflyIII\Http\Requests\SplitJournalFormRequest*/- public function testUpdate()+ public function testUpdate(): void{$currencyRepository = $this->mock(CurrencyRepositoryInterface::class);$accountRepository = $this->mock(AccountRepositoryInterface::class);@@ -341,7 +341,7 @@ class SplitControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\SplitController::isOpeningBalance* @covers \FireflyIII\Http\Requests\SplitJournalFormRequest*/- public function testUpdateOpeningBalance()+ public function testUpdateOpeningBalance(): void{$currencyRepository = $this->mock(CurrencyRepositoryInterface::class);$accountRepository = $this->mock(AccountRepositoryInterface::class);@@ -383,7 +383,7 @@ class SplitControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\SplitController::update* @covers \FireflyIII\Http\Requests\SplitJournalFormRequest*/- public function testUpdateTransfer()+ public function testUpdateTransfer(): void{$currencyRepository = $this->mock(CurrencyRepositoryInterface::class);$accountRepository = $this->mock(AccountRepositoryInterface::class);@@ -439,7 +439,7 @@ class SplitControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Transaction\SplitController::update* @covers \FireflyIII\Http\Requests\SplitJournalFormRequest*/- public function testUpdateWithdrawal()+ public function testUpdateWithdrawal(): void{$currencyRepository = $this->mock(CurrencyRepositoryInterface::class);$accountRepository = $this->mock(AccountRepositoryInterface::class);diff --git a/tests/Feature/Controllers/TransactionControllerTest.php b/tests/Feature/Controllers/TransactionControllerTest.phpindex e7a532e72a..2f95316af3 100644--- a/tests/Feature/Controllers/TransactionControllerTest.php+++ b/tests/Feature/Controllers/TransactionControllerTest.php@@ -59,7 +59,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\TransactionController::getPeriodOverview* @covers \FireflyIII\Http\Controllers\TransactionController::sumPerCurrency*/- public function testIndex()+ public function testIndex(): void{$date = new Carbon;$this->session(['start' => $date, 'end' => clone $date]);@@ -93,7 +93,7 @@ class TransactionControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\TransactionController::index*/- public function testIndexAll()+ public function testIndexAll(): void{$date = new Carbon;$this->session(['start' => $date, 'end' => clone $date]);@@ -129,7 +129,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\TransactionController::getPeriodOverview* @covers \FireflyIII\Http\Controllers\TransactionController::sumPerCurrency*/- public function testIndexByDate()+ public function testIndexByDate(): void{$transaction = new Transaction;$transaction->transaction_currency_id = 1;@@ -173,7 +173,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\TransactionController::getPeriodOverview* @covers \FireflyIII\Http\Controllers\TransactionController::sumPerCurrency*/- public function testIndexDeposit()+ public function testIndexDeposit(): void{$transaction = new Transaction;$transaction->transaction_currency_id = 1;@@ -216,7 +216,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\TransactionController::getPeriodOverview* @covers \FireflyIII\Http\Controllers\TransactionController::sumPerCurrency*/- public function testIndexWithdrawal()+ public function testIndexWithdrawal(): void{$transaction = new Transaction;$transaction->transaction_currency_id = 1;@@ -256,7 +256,7 @@ class TransactionControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\TransactionController::reconcile*/- public function testReconcile()+ public function testReconcile(): void{$data = ['transactions' => [1, 2]];$repository = $this->mock(JournalRepositoryInterface::class);@@ -273,7 +273,7 @@ class TransactionControllerTest extends TestCase/*** @covers \FireflyIII\Http\Controllers\TransactionController::reorder*/- public function testReorder()+ public function testReorder(): void{// mock stuff$journal = factory(TransactionJournal::class)->make();@@ -296,7 +296,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\TransactionController::show* @covers \FireflyIII\Http\Controllers\Controller::isOpeningBalance*/- public function testShow()+ public function testShow(): void{// mock stuff$linkRepos = $this->mock(LinkTypeRepositoryInterface::class);@@ -319,7 +319,7 @@ class TransactionControllerTest extends TestCase* @covers \FireflyIII\Http\Controllers\Controller::redirectToAccount* @covers \FireflyIII\Http\Controllers\TransactionController::show*/- public function testShowOpeningBalance()+ public function testShowOpeningBalance(): void{$linkRepos = $this->mock(LinkTypeRepositoryInterface::class);$linkRepos->shouldReceive('get')->andReturn(new Collection);diff --git a/tests/Feature/ExampleTest.php b/tests/Feature/ExampleTest.phpindex 4e8871e86d..0088f7e6f4 100644--- a/tests/Feature/ExampleTest.php+++ b/tests/Feature/ExampleTest.php@@ -32,7 +32,7 @@ class ExampleTest extends TestCase/*** A basic test example.*/- public function testBasicTest()+ public function testBasicTest(): void{$response = $this->get('/login');diff --git a/tests/TestCase.php b/tests/TestCase.phpindex 6d090c1c9c..8dcba3a554 100644--- a/tests/TestCase.php+++ b/tests/TestCase.php@@ -47,7 +47,7 @@ abstract class TestCase extends BaseTestCase* @param User $user* @param string $range*/- public function changeDateRange(User $user, $range)+ public function changeDateRange(User $user, $range): void{$valid = ['1D', '1W', '1M', '3M', '6M', '1Y', 'custom'];if (\in_array($range, $valid)) {@@ -55,6 +55,7 @@ abstract class TestCase extends BaseTestCasePreference::where('user_id', $user->id)->where('name', 'viewRange')->delete();} catch (Exception $e) {// don't care.+ $e->getMessage();}Preference::create(@@ -81,7 +82,7 @@ abstract class TestCase extends BaseTestCase/*** @return array*/- public function dateRangeProvider()+ public function dateRangeProvider(): array{return ['one day' => ['1D'],@@ -123,7 +124,7 @@ abstract class TestCase extends BaseTestCase** @return \Mockery\MockInterface*/- protected function mock($class)+ protected function mock($class): \Mockery\MockInterface{Log::debug(sprintf('Will now mock %s', $class));$object = Mockery::mock($class);@@ -137,7 +138,7 @@ abstract class TestCase extends BaseTestCase** @return Mockery\MockInterface*/- protected function overload(string $class)+ protected function overload(string $class): \Mockery\MockInterface{//$this->app->instance($class, $externalMock);return Mockery::mock('overload:' . $class);diff --git a/tests/Unit/ExampleTest.php b/tests/Unit/ExampleTest.phpindex e3b7024ec6..885cf132c4 100644--- a/tests/Unit/ExampleTest.php+++ b/tests/Unit/ExampleTest.php@@ -32,7 +32,7 @@ class ExampleTest extends TestCase/*** A basic test example.*/- public function testBasicTest()+ public function testBasicTest(): void{$this->assertTrue(true);}diff --git a/tests/Unit/Factory/AccountFactoryTest.php b/tests/Unit/Factory/AccountFactoryTest.phpindex 51439d6b49..951ec2bb92 100644--- a/tests/Unit/Factory/AccountFactoryTest.php+++ b/tests/Unit/Factory/AccountFactoryTest.php@@ -42,7 +42,7 @@ class AccountFactoryTest extends TestCase* @covers \FireflyIII\Factory\AccountMetaFactory* @covers \FireflyIII\Services\Internal\Support\AccountServiceTrait*/- public function testCreateBasic()+ public function testCreateBasic(): void{$data = [@@ -81,7 +81,7 @@ class AccountFactoryTest extends TestCase* @covers \FireflyIII\Factory\AccountMetaFactory* @covers \FireflyIII\Services\Internal\Support\AccountServiceTrait*/- public function testCreateBasicEmptyVb()+ public function testCreateBasicEmptyVb(): void{$data = [@@ -120,7 +120,7 @@ class AccountFactoryTest extends TestCase* @covers \FireflyIII\Factory\AccountMetaFactory* @covers \FireflyIII\Services\Internal\Support\AccountServiceTrait*/- public function testCreateBasicCC()+ public function testCreateBasicCC(): void{$data = [@@ -167,7 +167,7 @@ class AccountFactoryTest extends TestCase* @covers \FireflyIII\Factory\AccountMetaFactory* @covers \FireflyIII\Services\Internal\Support\AccountServiceTrait*/- public function testCreateBasicExpense()+ public function testCreateBasicExpense(): void{$data = [@@ -206,7 +206,7 @@ class AccountFactoryTest extends TestCase* @covers \FireflyIII\Factory\AccountMetaFactory* @covers \FireflyIII\Services\Internal\Support\AccountServiceTrait*/- public function testCreateBasicExpenseFullType()+ public function testCreateBasicExpenseFullType(): void{$data = [@@ -244,7 +244,7 @@ class AccountFactoryTest extends TestCase* @covers \FireflyIII\Factory\AccountMetaFactory* @covers \FireflyIII\Services\Internal\Support\AccountServiceTrait*/- public function testCreateBasicIB()+ public function testCreateBasicIB(): void{$data = [@@ -290,7 +290,7 @@ class AccountFactoryTest extends TestCase* @covers \FireflyIII\Factory\AccountMetaFactory* @covers \FireflyIII\Services\Internal\Support\AccountServiceTrait*/- public function testCreateBasicIBZero()+ public function testCreateBasicIBZero(): void{$data = [@@ -335,7 +335,7 @@ class AccountFactoryTest extends TestCase* @covers \FireflyIII\Factory\AccountMetaFactory* @covers \FireflyIII\Services\Internal\Support\AccountServiceTrait*/- public function testCreateBasicIban()+ public function testCreateBasicIban(): void{$data = [@@ -374,7 +374,7 @@ class AccountFactoryTest extends TestCase* @covers \FireflyIII\Factory\AccountMetaFactory* @covers \FireflyIII\Services\Internal\Support\AccountServiceTrait*/- public function testCreateBasicInvalidIban()+ public function testCreateBasicInvalidIban(): void{$data = [@@ -413,7 +413,7 @@ class AccountFactoryTest extends TestCase* @covers \FireflyIII\Factory\AccountMetaFactory* @covers \FireflyIII\Services\Internal\Support\AccountServiceTrait*/- public function testCreateBasicNegativeIB()+ public function testCreateBasicNegativeIB(): void{$data = [@@ -459,7 +459,7 @@ class AccountFactoryTest extends TestCase* @covers \FireflyIII\Factory\AccountMetaFactory* @covers \FireflyIII\Services\Internal\Support\AccountServiceTrait*/- public function testCreateBasicNotes()+ public function testCreateBasicNotes(): void{$data = [@@ -500,7 +500,7 @@ class AccountFactoryTest extends TestCase** @covers \FireflyIII\Factory\AccountFactory*/- public function testCreateExisting()+ public function testCreateExisting(): void{$existing = $this->user()->accounts()->where('account_type_id', 3)->first();$data = [diff --git a/tests/Unit/Factory/BillFactoryTest.php b/tests/Unit/Factory/BillFactoryTest.phpindex 7f4d83b1b3..74203bef86 100644--- a/tests/Unit/Factory/BillFactoryTest.php+++ b/tests/Unit/Factory/BillFactoryTest.php@@ -39,7 +39,7 @@ class BillFactoryTest extends TestCase* @covers \FireflyIII\Factory\BillFactory* @covers \FireflyIII\Services\Internal\Support\BillServiceTrait*/- public function testCreateBasic()+ public function testCreateBasic(): void{$data = ['name' => 'Some new bill #' . random_int(1, 1000),@@ -73,7 +73,7 @@ class BillFactoryTest extends TestCase* @covers \FireflyIII\Factory\BillFactory* @covers \FireflyIII\Services\Internal\Support\BillServiceTrait*/- public function testCreateEmptyNotes()+ public function testCreateEmptyNotes(): void{$data = ['name' => 'Some new bill #' . random_int(1, 1000),@@ -106,7 +106,7 @@ class BillFactoryTest extends TestCase* @covers \FireflyIII\Factory\BillFactory**/- public function testFindById()+ public function testFindById(): void{$existing = $this->user()->piggyBanks()->first();/** @var BillFactory $factory */@@ -122,7 +122,7 @@ class BillFactoryTest extends TestCase* @covers \FireflyIII\Factory\BillFactory**/- public function testFindByName()+ public function testFindByName(): void{$existing = $this->user()->bills()->first();/** @var BillFactory $factory */@@ -139,7 +139,7 @@ class BillFactoryTest extends TestCase* @covers \FireflyIII\Factory\BillFactory**/- public function testFindByUnknownName()+ public function testFindByUnknownName(): void{/** @var BillFactory $factory */$factory = app(BillFactory::class);@@ -155,7 +155,7 @@ class BillFactoryTest extends TestCase* @covers \FireflyIII\Factory\BillFactory**/- public function testFindNull()+ public function testFindNull(): void{/** @var BillFactory $factory */$factory = app(BillFactory::class);diff --git a/tests/Unit/Factory/BudgetFactoryTest.php b/tests/Unit/Factory/BudgetFactoryTest.phpindex d5828fd31a..32397d5a4a 100644--- a/tests/Unit/Factory/BudgetFactoryTest.php+++ b/tests/Unit/Factory/BudgetFactoryTest.php@@ -37,7 +37,7 @@ class BudgetFactoryTest extends TestCase** @covers \FireflyIII\Factory\BudgetFactory*/- public function testFindById()+ public function testFindById(): void{$existing = $this->user()->budgets()->first();/** @var BudgetFactory $factory */@@ -54,7 +54,7 @@ class BudgetFactoryTest extends TestCase** @covers \FireflyIII\Factory\BudgetFactory*/- public function testFindByName()+ public function testFindByName(): void{$existing = $this->user()->budgets()->first();/** @var BudgetFactory $factory */@@ -71,7 +71,7 @@ class BudgetFactoryTest extends TestCase** @covers \FireflyIII\Factory\BudgetFactory*/- public function testFindNull()+ public function testFindNull(): void{/** @var BudgetFactory $factory */$factory = app(BudgetFactory::class);@@ -86,7 +86,7 @@ class BudgetFactoryTest extends TestCase** @covers \FireflyIII\Factory\BudgetFactory*/- public function testFindUnknown()+ public function testFindUnknown(): void{/** @var BudgetFactory $factory */$factory = app(BudgetFactory::class);diff --git a/tests/Unit/Factory/CategoryFactoryTest.php b/tests/Unit/Factory/CategoryFactoryTest.phpindex 4bb8a6ddb1..706f6dced3 100644--- a/tests/Unit/Factory/CategoryFactoryTest.php+++ b/tests/Unit/Factory/CategoryFactoryTest.php@@ -34,7 +34,7 @@ class CategoryFactoryTest extends TestCase/*** @covers \FireflyIII\Factory\CategoryFactory*/- public function testFindOrCreateExistingID()+ public function testFindOrCreateExistingID(): void{$existing = $this->user()->categories()->first();@@ -48,7 +48,7 @@ class CategoryFactoryTest extends TestCase/*** @covers \FireflyIII\Factory\CategoryFactory*/- public function testFindOrCreateExistingName()+ public function testFindOrCreateExistingName(): void{$existing = $this->user()->categories()->first();@@ -64,7 +64,7 @@ class CategoryFactoryTest extends TestCase** @covers \FireflyIII\Factory\CategoryFactory*/- public function testFindOrCreateInvalidID()+ public function testFindOrCreateInvalidID(): void{$existing = $this->user()->categories()->max('id');$existing += 4;@@ -78,7 +78,7 @@ class CategoryFactoryTest extends TestCase/*** @covers \FireflyIII\Factory\CategoryFactory*/- public function testFindOrCreateNewName()+ public function testFindOrCreateNewName(): void{$name = 'Some new category #' . random_int(1, 1000);@@ -92,7 +92,7 @@ class CategoryFactoryTest extends TestCase/*** @covers \FireflyIII\Factory\CategoryFactory*/- public function testFindOrCreateNull()+ public function testFindOrCreateNull(): void{/** @var CategoryFactory $factory */$factory = app(CategoryFactory::class);diff --git a/tests/Unit/Factory/PiggyBankEventFactoryTest.php b/tests/Unit/Factory/PiggyBankEventFactoryTest.phpindex 5e1fda97f2..c6079835bf 100644--- a/tests/Unit/Factory/PiggyBankEventFactoryTest.php+++ b/tests/Unit/Factory/PiggyBankEventFactoryTest.php@@ -39,7 +39,7 @@ class PiggyBankEventFactoryTest extends TestCase/*** @covers \FireflyIII\Factory\PiggyBankEventFactory*/- public function testCreateAmountZero()+ public function testCreateAmountZero(): void{/** @var TransactionJournal $transfer */$transfer = $this->user()->transactionJournals()->where('transaction_type_id', 3)->first();@@ -60,7 +60,7 @@ class PiggyBankEventFactoryTest extends TestCase/*** @covers \FireflyIII\Factory\PiggyBankEventFactory*/- public function testCreateNoPiggy()+ public function testCreateNoPiggy(): void{/** @var TransactionJournal $transfer */$transfer = $this->user()->transactionJournals()->where('transaction_type_id', 3)->first();@@ -96,7 +96,7 @@ class PiggyBankEventFactoryTest extends TestCase/*** @covers \FireflyIII\Factory\PiggyBankEventFactory*/- public function testCreateNotTransfer()+ public function testCreateNotTransfer(): void{/** @var TransactionJournal $deposit */$deposit = $this->user()->transactionJournals()->where('transaction_type_id', 2)->first();@@ -110,7 +110,7 @@ class PiggyBankEventFactoryTest extends TestCase/*** @covers \FireflyIII\Factory\PiggyBankEventFactory*/- public function testCreateSuccess()+ public function testCreateSuccess(): void{/** @var TransactionJournal $transfer */$transfer = $this->user()->transactionJournals()->where('transaction_type_id', 3)->first();diff --git a/tests/Unit/Factory/PiggyBankFactoryTest.php b/tests/Unit/Factory/PiggyBankFactoryTest.phpindex 7905dd06dd..042e63856a 100644--- a/tests/Unit/Factory/PiggyBankFactoryTest.php+++ b/tests/Unit/Factory/PiggyBankFactoryTest.php@@ -37,7 +37,7 @@ class PiggyBankFactoryTest extends TestCase** @covers \FireflyIII\Factory\PiggyBankFactory*/- public function testFindById()+ public function testFindById(): void{$existing = $this->user()->piggyBanks()->first();/** @var PiggyBankFactory $factory */@@ -54,7 +54,7 @@ class PiggyBankFactoryTest extends TestCase** @covers \FireflyIII\Factory\PiggyBankFactory*/- public function testFindByName()+ public function testFindByName(): void{$existing = $this->user()->piggyBanks()->first();/** @var PiggyBankFactory $factory */@@ -71,7 +71,7 @@ class PiggyBankFactoryTest extends TestCase** @covers \FireflyIII\Factory\PiggyBankFactory*/- public function testFindNull()+ public function testFindNull(): void{/** @var PiggyBankFactory $factory */$factory = app(PiggyBankFactory::class);@@ -86,7 +86,7 @@ class PiggyBankFactoryTest extends TestCase** @covers \FireflyIII\Factory\PiggyBankFactory*/- public function testFindUnknown()+ public function testFindUnknown(): void{/** @var PiggyBankFactory $factory */$factory = app(PiggyBankFactory::class);diff --git a/tests/Unit/Factory/TagFactoryTest.php b/tests/Unit/Factory/TagFactoryTest.phpindex 41e239e392..67c3c0093e 100644--- a/tests/Unit/Factory/TagFactoryTest.php+++ b/tests/Unit/Factory/TagFactoryTest.php@@ -35,7 +35,7 @@ class TagFactoryTest extends TestCase/*** @covers \FireflyIII\Factory\TagFactory*/- public function testFindOrCreateExisting()+ public function testFindOrCreateExisting(): void{$tag = $this->user()->tags()->first();/** @var TagFactory $factory */@@ -49,7 +49,7 @@ class TagFactoryTest extends TestCase/*** @covers \FireflyIII\Factory\TagFactory*/- public function testFindOrCreateNew()+ public function testFindOrCreateNew(): void{$tag = 'Some new tag#' . random_int(1, 1000);/** @var TagFactory $factory */diff --git a/tests/Unit/Factory/TransactionCurrencyFactoryTest.php b/tests/Unit/Factory/TransactionCurrencyFactoryTest.phpindex afc8d921a8..5c3a6e45ea 100644--- a/tests/Unit/Factory/TransactionCurrencyFactoryTest.php+++ b/tests/Unit/Factory/TransactionCurrencyFactoryTest.php@@ -36,7 +36,7 @@ class TransactionCurrencyFactoryTest extends TestCase/*** @covers \FireflyIII\Factory\TransactionCurrencyFactory*/- public function testCreate()+ public function testCreate(): void{/** @var TransactionCurrencyFactory $factory */$factory = app(TransactionCurrencyFactory::class);@@ -48,7 +48,7 @@ class TransactionCurrencyFactoryTest extends TestCase/*** @covers \FireflyIII\Factory\TransactionCurrencyFactory*/- public function testCreateEmpty()+ public function testCreateEmpty(): void{/** @var TransactionCurrencyFactory $factory */$factory = app(TransactionCurrencyFactory::class);@@ -59,7 +59,7 @@ class TransactionCurrencyFactoryTest extends TestCase/*** @covers \FireflyIII\Factory\TransactionCurrencyFactory*/- public function testFindByBadCode()+ public function testFindByBadCode(): void{/** @var TransactionCurrencyFactory $factory */$factory = app(TransactionCurrencyFactory::class);@@ -70,7 +70,7 @@ class TransactionCurrencyFactoryTest extends TestCase/*** @covers \FireflyIII\Factory\TransactionCurrencyFactory*/- public function testFindByCode()+ public function testFindByCode(): void{// ;$currency = TransactionCurrency::inRandomOrder()->whereNull('deleted_at')->first();@@ -83,7 +83,7 @@ class TransactionCurrencyFactoryTest extends TestCase/*** @covers \FireflyIII\Factory\TransactionCurrencyFactory*/- public function testFindByID()+ public function testFindByID(): void{$currency = TransactionCurrency::inRandomOrder()->whereNull('deleted_at')->first();/** @var TransactionCurrencyFactory $factory */@@ -95,7 +95,7 @@ class TransactionCurrencyFactoryTest extends TestCase/*** @covers \FireflyIII\Factory\TransactionCurrencyFactory*/- public function testFindNull()+ public function testFindNull(): void{/** @var TransactionCurrencyFactory $factory */$factory = app(TransactionCurrencyFactory::class);diff --git a/tests/Unit/Factory/TransactionFactoryTest.php b/tests/Unit/Factory/TransactionFactoryTest.phpindex 3a62eabb27..a2a3d7dac3 100644--- a/tests/Unit/Factory/TransactionFactoryTest.php+++ b/tests/Unit/Factory/TransactionFactoryTest.php@@ -24,6 +24,7 @@ declare(strict_types=1);namespace Tests\Unit\Factory;+use FireflyIII\Exceptions\FireflyException;use FireflyIII\Factory\AccountFactory;use FireflyIII\Factory\BudgetFactory;use FireflyIII\Factory\CategoryFactory;@@ -45,7 +46,7 @@ class TransactionFactoryTest extends TestCase* @covers \FireflyIII\Factory\TransactionFactory* @covers \FireflyIII\Services\Internal\Support\TransactionServiceTrait*/- public function testCreatePairBasic()+ public function testCreatePairBasic(): void{// objects:$asset = $this->user()->accounts()->where('account_type_id', 3)->first();@@ -97,7 +98,11 @@ class TransactionFactoryTest extends TestCase/** @var TransactionFactory $factory */$factory = app(TransactionFactory::class);$factory->setUser($this->user());- $collection = $factory->createPair($withdrawal, $data);+ try {+ $collection = $factory->createPair($withdrawal, $data);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }$newCount = $withdrawal->transactions()->count();@@ -119,7 +124,7 @@ class TransactionFactoryTest extends TestCase* @covers \FireflyIII\Factory\TransactionFactory* @covers \FireflyIII\Services\Internal\Support\TransactionServiceTrait*/- public function testCreatePairBasicByName()+ public function testCreatePairBasicByName(): void{// objects:$asset = $this->user()->accounts()->where('account_type_id', 3)->first();@@ -175,7 +180,11 @@ class TransactionFactoryTest extends TestCase/** @var TransactionFactory $factory */$factory = app(TransactionFactory::class);$factory->setUser($this->user());- $collection = $factory->createPair($withdrawal, $data);+ try {+ $collection = $factory->createPair($withdrawal, $data);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }$newCount = $withdrawal->transactions()->count();@@ -197,7 +206,7 @@ class TransactionFactoryTest extends TestCase* @covers \FireflyIII\Factory\TransactionFactory* @covers \FireflyIII\Services\Internal\Support\TransactionServiceTrait*/- public function testCreatePairBasicIntoCash()+ public function testCreatePairBasicIntoCash(): void{// objects:$asset = $this->user()->accounts()->where('account_type_id', 3)->first();@@ -253,8 +262,11 @@ class TransactionFactoryTest extends TestCase/** @var TransactionFactory $factory */$factory = app(TransactionFactory::class);$factory->setUser($this->user());- $collection = $factory->createPair($withdrawal, $data);-+ try {+ $collection = $factory->createPair($withdrawal, $data);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }$newCount = $withdrawal->transactions()->count();$this->assertCount(2, $collection);@@ -277,7 +289,7 @@ class TransactionFactoryTest extends TestCase* @covers \FireflyIII\Factory\TransactionFactory* @covers \FireflyIII\Services\Internal\Support\TransactionServiceTrait*/- public function testCreatePairBasicMeta()+ public function testCreatePairBasicMeta(): void{// objects:$asset = $this->user()->accounts()->where('account_type_id', 3)->first();@@ -331,8 +343,11 @@ class TransactionFactoryTest extends TestCase/** @var TransactionFactory $factory */$factory = app(TransactionFactory::class);$factory->setUser($this->user());- $collection = $factory->createPair($withdrawal, $data);-+ try {+ $collection = $factory->createPair($withdrawal, $data);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }$newCount = $withdrawal->transactions()->count();$this->assertCount(2, $collection);@@ -357,7 +372,7 @@ class TransactionFactoryTest extends TestCase* @covers \FireflyIII\Factory\TransactionFactory* @covers \FireflyIII\Services\Internal\Support\TransactionServiceTrait*/- public function testCreatePairDeposit()+ public function testCreatePairDeposit(): void{// objects:$asset = $this->user()->accounts()->where('account_type_id', 3)->first();@@ -410,8 +425,11 @@ class TransactionFactoryTest extends TestCase/** @var TransactionFactory $factory */$factory = app(TransactionFactory::class);$factory->setUser($this->user());- $collection = $factory->createPair($deposit, $data);-+ try {+ $collection = $factory->createPair($deposit, $data);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }$newCount = $deposit->transactions()->count();$this->assertCount(2, $collection);@@ -434,7 +452,7 @@ class TransactionFactoryTest extends TestCase* @covers \FireflyIII\Factory\TransactionFactory* @covers \FireflyIII\Services\Internal\Support\TransactionServiceTrait*/- public function testCreatePairDepositByName()+ public function testCreatePairDepositByName(): void{// objects:$asset = $this->user()->accounts()->where('account_type_id', 3)->first();@@ -491,7 +509,11 @@ class TransactionFactoryTest extends TestCase/** @var TransactionFactory $factory */$factory = app(TransactionFactory::class);$factory->setUser($this->user());- $collection = $factory->createPair($deposit, $data);+ try {+ $collection = $factory->createPair($deposit, $data);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }$newCount = $deposit->transactions()->count();@@ -515,7 +537,7 @@ class TransactionFactoryTest extends TestCase* @covers \FireflyIII\Factory\TransactionFactory* @covers \FireflyIII\Services\Internal\Support\TransactionServiceTrait*/- public function testCreatePairDepositCash()+ public function testCreatePairDepositCash(): void{// objects:$asset = $this->user()->accounts()->where('account_type_id', 3)->first();@@ -573,7 +595,11 @@ class TransactionFactoryTest extends TestCase/** @var TransactionFactory $factory */$factory = app(TransactionFactory::class);$factory->setUser($this->user());- $collection = $factory->createPair($deposit, $data);+ try {+ $collection = $factory->createPair($deposit, $data);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }$newCount = $deposit->transactions()->count();@@ -595,7 +621,7 @@ class TransactionFactoryTest extends TestCase* @covers \FireflyIII\Factory\TransactionFactory* @covers \FireflyIII\Services\Internal\Support\TransactionServiceTrait*/- public function testCreatePairForeign()+ public function testCreatePairForeign(): void{// objects:$asset = $this->user()->accounts()->where('account_type_id', 3)->first();@@ -648,8 +674,11 @@ class TransactionFactoryTest extends TestCase/** @var TransactionFactory $factory */$factory = app(TransactionFactory::class);$factory->setUser($this->user());- $collection = $factory->createPair($withdrawal, $data);-+ try {+ $collection = $factory->createPair($withdrawal, $data);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }$newCount = $withdrawal->transactions()->count();$this->assertCount(2, $collection);@@ -672,7 +701,7 @@ class TransactionFactoryTest extends TestCase* @covers \FireflyIII\Factory\TransactionFactory* @covers \FireflyIII\Services\Internal\Support\TransactionServiceTrait*/- public function testCreatePairReconciliation()+ public function testCreatePairReconciliation(): void{// objects:$asset = $this->user()->accounts()->where('account_type_id', 3)->first();@@ -725,7 +754,11 @@ class TransactionFactoryTest extends TestCase/** @var TransactionFactory $factory */$factory = app(TransactionFactory::class);$factory->setUser($this->user());- $collection = $factory->createPair($recon, $data);+ try {+ $collection = $factory->createPair($recon, $data);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }$newCount = $recon->transactions()->count();@@ -749,7 +782,7 @@ class TransactionFactoryTest extends TestCase* @covers \FireflyIII\Factory\TransactionFactory* @covers \FireflyIII\Services\Internal\Support\TransactionServiceTrait*/- public function testCreatePairTransfer()+ public function testCreatePairTransfer(): void{// objects:$asset = $this->user()->accounts()->where('account_type_id', 3)->first();@@ -802,7 +835,11 @@ class TransactionFactoryTest extends TestCase/** @var TransactionFactory $factory */$factory = app(TransactionFactory::class);$factory->setUser($this->user());- $collection = $factory->createPair($transfer, $data);+ try {+ $collection = $factory->createPair($transfer, $data);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }$newCount = $transfer->transactions()->count();diff --git a/tests/Unit/Factory/TransactionJournalFactoryTest.php b/tests/Unit/Factory/TransactionJournalFactoryTest.phpindex 715d837476..2d9503f173 100644--- a/tests/Unit/Factory/TransactionJournalFactoryTest.php+++ b/tests/Unit/Factory/TransactionJournalFactoryTest.php@@ -49,7 +49,7 @@ class TransactionJournalFactoryTest extends TestCase* @covers \FireflyIII\Factory\TransactionJournalFactory* @covers \FireflyIII\Services\Internal\Support\JournalServiceTrait*/- public function testCreateBasic()+ public function testCreateBasic(): void{// mock used classes:$type = TransactionType::find(1);@@ -111,7 +111,7 @@ class TransactionJournalFactoryTest extends TestCase* @covers \FireflyIII\Factory\TransactionJournalFactory* @covers \FireflyIII\Services\Internal\Support\JournalServiceTrait*/- public function testCreateBasicMeta()+ public function testCreateBasicMeta(): void{// mock used classes:$type = TransactionType::find(1);diff --git a/tests/Unit/Factory/TransactionJournalMetaFactoryTest.php b/tests/Unit/Factory/TransactionJournalMetaFactoryTest.phpindex f38b4fdd57..e17427694a 100644--- a/tests/Unit/Factory/TransactionJournalMetaFactoryTest.php+++ b/tests/Unit/Factory/TransactionJournalMetaFactoryTest.php@@ -37,7 +37,7 @@ class TransactionJournalMetaFactoryTest extends TestCase/*** @covers \FireflyIII\Factory\TransactionJournalMetaFactory*/- public function testUpdateOrCreateBasic()+ public function testUpdateOrCreateBasic(): void{/** @var TransactionJournal $journal */$journal = $this->user()->transactionJournals()->inRandomOrder()->first();@@ -58,7 +58,7 @@ class TransactionJournalMetaFactoryTest extends TestCase/*** @covers \FireflyIII\Factory\TransactionJournalMetaFactory*/- public function testUpdateOrCreateDate()+ public function testUpdateOrCreateDate(): void{/** @var TransactionJournal $journal */$journal = $this->user()->transactionJournals()->inRandomOrder()->first();@@ -79,7 +79,7 @@ class TransactionJournalMetaFactoryTest extends TestCase/*** @covers \FireflyIII\Factory\TransactionJournalMetaFactory*/- public function testUpdateOrCreateDeleteExisting()+ public function testUpdateOrCreateDeleteExisting(): void{/** @var TransactionJournal $journal */$journal = $this->user()->transactionJournals()->where('transaction_type_id', 3)->first();@@ -90,6 +90,7 @@ class TransactionJournalMetaFactoryTest extends TestCase'data' => 'bye!',]);+ $count = $journal->transactionJournalMeta()->count();$set = ['journal' => $journal,@@ -100,13 +101,13 @@ class TransactionJournalMetaFactoryTest extends TestCase$factory = app(TransactionJournalMetaFactory::class);$factory->updateOrCreate($set);- $this->assertEquals(0, $journal->transactionJournalMeta()->count());+ $this->assertEquals($count-1, $journal->transactionJournalMeta()->count());}/*** @covers \FireflyIII\Factory\TransactionJournalMetaFactory*/- public function testUpdateOrCreateEmpty()+ public function testUpdateOrCreateEmpty(): void{/** @var TransactionJournal $journal */$journal = $this->user()->transactionJournals()->inRandomOrder()->first();@@ -127,7 +128,7 @@ class TransactionJournalMetaFactoryTest extends TestCase/*** @covers \FireflyIII\Factory\TransactionJournalMetaFactory*/- public function testUpdateOrCreateExistingEmpty()+ public function testUpdateOrCreateExistingEmpty(): void{/** @var TransactionJournal $journal */$journal = $this->user()->transactionJournals()->inRandomOrder()->first();diff --git a/tests/Unit/Handlers/Events/AdminEventHandlerTest.php b/tests/Unit/Handlers/Events/AdminEventHandlerTest.phpindex f7d3f0cc0d..f765caf4ed 100644--- a/tests/Unit/Handlers/Events/AdminEventHandlerTest.php+++ b/tests/Unit/Handlers/Events/AdminEventHandlerTest.php@@ -42,7 +42,7 @@ class AdminEventHandlerTest extends TestCase* @covers \FireflyIII\Handlers\Events\AdminEventHandler::sendTestMessage* @covers \FireflyIII\Events\AdminRequestedTestMessage*/- public function testSendNoMessage()+ public function testSendNoMessage(): void{$repository = $this->mock(UserRepositoryInterface::class);$event = new AdminRequestedTestMessage($this->user(), '127.0.0.1');@@ -58,7 +58,7 @@ class AdminEventHandlerTest extends TestCase* @covers \FireflyIII\Handlers\Events\AdminEventHandler::sendTestMessage* @covers \FireflyIII\Events\AdminRequestedTestMessage*/- public function testSendTestMessage()+ public function testSendTestMessage(): void{Mail::fake();$repository = $this->mock(UserRepositoryInterface::class);diff --git a/tests/Unit/Handlers/Events/UserEventHandlerTest.php b/tests/Unit/Handlers/Events/UserEventHandlerTest.phpindex 9cc3d59360..a74ac77800 100644--- a/tests/Unit/Handlers/Events/UserEventHandlerTest.php+++ b/tests/Unit/Handlers/Events/UserEventHandlerTest.php@@ -50,7 +50,7 @@ class UserEventHandlerTest extends TestCase* @covers \FireflyIII\Handlers\Events\UserEventHandler::attachUserRole* @covers \FireflyIII\Events\RegisteredUser*/- public function testAttachUserRole()+ public function testAttachUserRole(): void{$repository = $this->mock(UserRepositoryInterface::class);$user = $this->emptyUser();@@ -66,7 +66,7 @@ class UserEventHandlerTest extends TestCase/*** @covers \FireflyIII\Handlers\Events\UserEventHandler::checkSingleUserIsAdmin*/- public function testCheckSingleUserIsAdminMulti()+ public function testCheckSingleUserIsAdminMulti(): void{$repository = $this->mock(UserRepositoryInterface::class);$user = $this->user();@@ -84,7 +84,7 @@ class UserEventHandlerTest extends TestCase/*** @covers \FireflyIII\Handlers\Events\UserEventHandler::checkSingleUserIsAdmin*/- public function testCheckSingleUserIsAdminNoRole()+ public function testCheckSingleUserIsAdminNoRole(): void{$repository = $this->mock(UserRepositoryInterface::class);$user = $this->emptyUser();@@ -104,7 +104,7 @@ class UserEventHandlerTest extends TestCase/*** @covers \FireflyIII\Handlers\Events\UserEventHandler::checkSingleUserIsAdmin*/- public function testCheckSingleUserIsAdminNotAdmin()+ public function testCheckSingleUserIsAdminNotAdmin(): void{$repository = $this->mock(UserRepositoryInterface::class);$user = $this->emptyUser();@@ -123,7 +123,7 @@ class UserEventHandlerTest extends TestCase/*** @covers \FireflyIII\Handlers\Events\UserEventHandler::checkSingleUserIsAdmin*/- public function testCheckSingleUserIsAdminSingle()+ public function testCheckSingleUserIsAdminSingle(): void{$repository = $this->mock(UserRepositoryInterface::class);$user = $this->user();@@ -141,7 +141,7 @@ class UserEventHandlerTest extends TestCase* @covers \FireflyIII\Handlers\Events\UserEventHandler::sendEmailChangeConfirmMail* @covers \FireflyIII\Events\UserChangedEmail*/- public function testSendEmailChangeConfirmMail()+ public function testSendEmailChangeConfirmMail(): void{Mail::fake();$user = $this->emptyUser();@@ -164,7 +164,7 @@ class UserEventHandlerTest extends TestCase* @covers \FireflyIII\Handlers\Events\UserEventHandler::sendEmailChangeUndoMail* @covers \FireflyIII\Events\UserChangedEmail*/- public function testSendEmailChangeUndoMail()+ public function testSendEmailChangeUndoMail(): void{Mail::fake();$user = $this->emptyUser();@@ -188,7 +188,7 @@ class UserEventHandlerTest extends TestCase* @covers \FireflyIII\Handlers\Events\UserEventHandler::sendNewPassword* @covers \FireflyIII\Events\RequestedNewPassword*/- public function testSendNewPassword()+ public function testSendNewPassword(): void{Mail::fake();$user = $this->emptyUser();@@ -211,7 +211,7 @@ class UserEventHandlerTest extends TestCase* @covers \FireflyIII\Handlers\Events\UserEventHandler::sendRegistrationMail* @covers \FireflyIII\Events\RegisteredUser*/- public function testSendRegistrationMail()+ public function testSendRegistrationMail(): void{Mail::fake();$user = $this->emptyUser();diff --git a/tests/Unit/Handlers/Events/VersionCheckEventHandlerTest.php b/tests/Unit/Handlers/Events/VersionCheckEventHandlerTest.phpindex 5f289b62c3..41416cfe7b 100644--- a/tests/Unit/Handlers/Events/VersionCheckEventHandlerTest.php+++ b/tests/Unit/Handlers/Events/VersionCheckEventHandlerTest.php@@ -43,7 +43,7 @@ class VersionCheckEventHandlerTest extends TestCase/****/- public function testCheckForUpdatesError()+ public function testCheckForUpdatesError(): void{$updateConfig = new Configuration;$updateConfig->data = 1;@@ -73,7 +73,7 @@ class VersionCheckEventHandlerTest extends TestCase* @covers \FireflyIII\Events\RequestedVersionCheckStatus* @covers \FireflyIII\Handlers\Events\VersionCheckEventHandler*/- public function testCheckForUpdatesNewer()+ public function testCheckForUpdatesNewer(): void{$updateConfig = new Configuration;$updateConfig->data = 1;@@ -106,7 +106,7 @@ class VersionCheckEventHandlerTest extends TestCase/****/- public function testCheckForUpdatesNoAdmin()+ public function testCheckForUpdatesNoAdmin(): void{$updateConfig = new Configuration;$updateConfig->data = 1;@@ -125,7 +125,7 @@ class VersionCheckEventHandlerTest extends TestCase/****/- public function testCheckForUpdatesNoPermission()+ public function testCheckForUpdatesNoPermission(): void{$updateConfig = new Configuration;$updateConfig->data = -1;@@ -148,7 +148,7 @@ class VersionCheckEventHandlerTest extends TestCase/****/- public function testCheckForUpdatesTooRecent()+ public function testCheckForUpdatesTooRecent(): void{$updateConfig = new Configuration;$updateConfig->data = 1;diff --git a/tests/Unit/Helpers/AttachmentHelperTest.php b/tests/Unit/Helpers/AttachmentHelperTest.phpindex bc9900e767..3e4cbc60e9 100644--- a/tests/Unit/Helpers/AttachmentHelperTest.php+++ b/tests/Unit/Helpers/AttachmentHelperTest.php@@ -41,7 +41,7 @@ class AttachmentHelperTest extends TestCase/*** @covers \FireflyIII\Helpers\Attachments\AttachmentHelper::getAttachmentLocation*/- public function testGetAttachmentLocation()+ public function testGetAttachmentLocation(): void{$attachment = Attachment::first();$helper = new AttachmentHelper;@@ -61,7 +61,7 @@ class AttachmentHelperTest extends TestCase* @covers \FireflyIII\Helpers\Attachments\AttachmentHelper::getMessages* @covers \FireflyIII\Helpers\Attachments\AttachmentHelper::getErrors*/- public function testInvalidMime()+ public function testInvalidMime(): void{$journal = TransactionJournal::first();$helper = new AttachmentHelper;@@ -90,7 +90,7 @@ class AttachmentHelperTest extends TestCase* @covers \FireflyIII\Helpers\Attachments\AttachmentHelper::getErrors* @covers \FireflyIII\Helpers\Attachments\AttachmentHelper::getAttachments*/- public function testSave()+ public function testSave(): void{Storage::fake('upload');@@ -118,7 +118,7 @@ class AttachmentHelperTest extends TestCase* @covers \FireflyIII\Helpers\Attachments\AttachmentHelper::__construct* @covers \FireflyIII\Helpers\Attachments\AttachmentHelper::saveAttachmentsForModel*/- public function testSaveEmpty()+ public function testSaveEmpty(): void{$journal = TransactionJournal::first();$helper = new AttachmentHelper;@@ -141,7 +141,7 @@ class AttachmentHelperTest extends TestCase* @covers \FireflyIII\Helpers\Attachments\AttachmentHelper::getErrors* @covers \FireflyIII\Helpers\Attachments\AttachmentHelper::getAttachments*/- public function testSaveSecond()+ public function testSaveSecond(): void{$journal = TransactionJournal::first();$helper = new AttachmentHelper;diff --git a/tests/Unit/Helpers/MetaPieChartTest.php b/tests/Unit/Helpers/MetaPieChartTest.phpindex 726fa3d5fa..791e12406d 100644--- a/tests/Unit/Helpers/MetaPieChartTest.php+++ b/tests/Unit/Helpers/MetaPieChartTest.php@@ -48,7 +48,7 @@ class MetaPieChartTest extends TestCase/*** @covers \FireflyIII\Helpers\Chart\MetaPieChart*/- public function testGenerateExpenseAccount()+ public function testGenerateExpenseAccount(): void{$som = (new Carbon())->startOfMonth();$eom = (new Carbon())->endOfMonth();@@ -101,7 +101,7 @@ class MetaPieChartTest extends TestCase/*** @covers \FireflyIII\Helpers\Chart\MetaPieChart*/- public function testGenerateExpenseAccountWithOthers()+ public function testGenerateExpenseAccountWithOthers(): void{$som = (new Carbon())->startOfMonth();$eom = (new Carbon())->endOfMonth();@@ -160,7 +160,7 @@ class MetaPieChartTest extends TestCase/*** @covers \FireflyIII\Helpers\Chart\MetaPieChart*/- public function testGenerateIncomeAccount()+ public function testGenerateIncomeAccount(): void{$som = (new Carbon())->startOfMonth();$eom = (new Carbon())->endOfMonth();@@ -212,7 +212,7 @@ class MetaPieChartTest extends TestCase/*** @covers \FireflyIII\Helpers\Chart\MetaPieChart*/- public function testGenerateIncomeAccountWithOthers()+ public function testGenerateIncomeAccountWithOthers(): void{$som = (new Carbon())->startOfMonth();$eom = (new Carbon())->endOfMonth();diff --git a/tests/Unit/Import/Converter/AmountCreditTest.php b/tests/Unit/Import/Converter/AmountCreditTest.phpindex 2e4bbd888f..351662c164 100644--- a/tests/Unit/Import/Converter/AmountCreditTest.php+++ b/tests/Unit/Import/Converter/AmountCreditTest.php@@ -33,7 +33,7 @@ class AmountCreditTest extends TestCase/*** @covers \FireflyIII\Import\Converter\AmountCredit::convert()*/- public function testConvert()+ public function testConvert(): void{$values = ['0' => '0',@@ -161,7 +161,7 @@ class AmountCreditTest extends TestCase/*** @covers \FireflyIII\Import\Converter\AmountCredit::convert()*/- public function testConvertNull()+ public function testConvertNull(): void{$converter = new AmountCredit;$result = $converter->convert(null);diff --git a/tests/Unit/Import/Converter/AmountDebitTest.php b/tests/Unit/Import/Converter/AmountDebitTest.phpindex 702b9f0992..f6a030c0bb 100644--- a/tests/Unit/Import/Converter/AmountDebitTest.php+++ b/tests/Unit/Import/Converter/AmountDebitTest.php@@ -33,7 +33,7 @@ class AmountDebitTest extends TestCase/*** @covers \FireflyIII\Import\Converter\AmountDebit::convert()*/- public function testConvert()+ public function testConvert(): void{$values = ['0' => '0',@@ -161,7 +161,7 @@ class AmountDebitTest extends TestCase/*** @covers \FireflyIII\Import\Converter\AmountDebit::convert()*/- public function testConvertNull()+ public function testConvertNull(): void{$converter = new AmountDebit;$result = $converter->convert(null);diff --git a/tests/Unit/Import/Converter/AmountTest.php b/tests/Unit/Import/Converter/AmountTest.phpindex 8545718f42..40ca358b7a 100644--- a/tests/Unit/Import/Converter/AmountTest.php+++ b/tests/Unit/Import/Converter/AmountTest.php@@ -34,7 +34,7 @@ class AmountTest extends TestCase* @covers \FireflyIII\Import\Converter\Amount::convert()* @covers \FireflyIII\Import\Converter\Amount::stripAmount()*/- public function testConvert()+ public function testConvert(): void{$values = ['0' => '0',@@ -167,7 +167,7 @@ class AmountTest extends TestCase/*** @covers \FireflyIII\Import\Converter\Amount::convert()*/- public function testConvertNull()+ public function testConvertNull(): void{$converter = new Amount;$result = $converter->convert(null);diff --git a/tests/Unit/Import/Converter/INGDebitCreditTest.php b/tests/Unit/Import/Converter/INGDebitCreditTest.phpindex c947e5e82b..5fe484396a 100644--- a/tests/Unit/Import/Converter/INGDebitCreditTest.php+++ b/tests/Unit/Import/Converter/INGDebitCreditTest.php@@ -34,7 +34,7 @@ class INGDebitCreditTest extends TestCase/*** @covers \FireflyIII\Import\Converter\INGDebitCredit::convert()*/- public function testConvertAf()+ public function testConvertAf(): void{$converter = new INGDebitCredit;$result = $converter->convert('Af');@@ -44,7 +44,7 @@ class INGDebitCreditTest extends TestCase/*** @covers \FireflyIII\Import\Converter\INGDebitCredit::convert()*/- public function testConvertAnything()+ public function testConvertAnything(): void{$converter = new INGDebitCredit;$result = $converter->convert('9083jkdkj');@@ -54,7 +54,7 @@ class INGDebitCreditTest extends TestCase/*** @covers \FireflyIII\Import\Converter\INGDebitCredit::convert()*/- public function testConvertBij()+ public function testConvertBij(): void{$converter = new INGDebitCredit;$result = $converter->convert('Bij');diff --git a/tests/Unit/Import/Mapper/AssetAccountIbansTest.php b/tests/Unit/Import/Mapper/AssetAccountIbansTest.phpindex c5ccb40bb3..fa92297075 100644--- a/tests/Unit/Import/Mapper/AssetAccountIbansTest.php+++ b/tests/Unit/Import/Mapper/AssetAccountIbansTest.php@@ -38,7 +38,7 @@ class AssetAccountIbansTest extends TestCase/*** @covers \FireflyIII\Import\Mapper\AssetAccountIbans::getMap()*/- public function testGetMapBasic()+ public function testGetMapBasic(): void{$one = new Account;$one->id = 17;diff --git a/tests/Unit/Import/Mapper/AssetAccountsTest.php b/tests/Unit/Import/Mapper/AssetAccountsTest.phpindex 97d9741383..8f1ddbf480 100644--- a/tests/Unit/Import/Mapper/AssetAccountsTest.php+++ b/tests/Unit/Import/Mapper/AssetAccountsTest.php@@ -38,7 +38,7 @@ class AssetAccountsTest extends TestCase/*** @covers \FireflyIII\Import\Mapper\AssetAccounts::getMap()*/- public function testGetMapBasic()+ public function testGetMapBasic(): void{$one = new Account;$one->id = 23;diff --git a/tests/Unit/Import/Mapper/BillsTest.php b/tests/Unit/Import/Mapper/BillsTest.phpindex 2d25dae93e..6daabd4c67 100644--- a/tests/Unit/Import/Mapper/BillsTest.php+++ b/tests/Unit/Import/Mapper/BillsTest.php@@ -24,7 +24,6 @@ declare(strict_types=1);namespace Tests\Unit\Import\Mapper;use FireflyIII\Import\Mapper\Bills;-use FireflyIII\Models\Account;use FireflyIII\Models\Bill;use FireflyIII\Repositories\Bill\BillRepositoryInterface;use Illuminate\Support\Collection;@@ -38,7 +37,7 @@ class BillsTest extends TestCase/*** @covers \FireflyIII\Import\Mapper\Bills::getMap()*/- public function testGetMapBasic()+ public function testGetMapBasic(): void{$one = new Bill;$one->id = 5;diff --git a/tests/Unit/Import/Mapper/BudgetsTest.php b/tests/Unit/Import/Mapper/BudgetsTest.phpindex 3c0b996ed6..00057df36a 100644--- a/tests/Unit/Import/Mapper/BudgetsTest.php+++ b/tests/Unit/Import/Mapper/BudgetsTest.php@@ -37,7 +37,7 @@ class BudgetsTest extends TestCase/*** @covers \FireflyIII\Import\Mapper\Budgets::getMap()*/- public function testGetMapBasic()+ public function testGetMapBasic(): void{$one = new Budget;$one->id = 8;diff --git a/tests/Unit/Import/Mapper/CategoriesTest.php b/tests/Unit/Import/Mapper/CategoriesTest.phpindex c2697fcd97..fc70fadd95 100644--- a/tests/Unit/Import/Mapper/CategoriesTest.php+++ b/tests/Unit/Import/Mapper/CategoriesTest.php@@ -37,7 +37,7 @@ class CategoriesTest extends TestCase/*** @covers \FireflyIII\Import\Mapper\Categories::getMap()*/- public function testGetMapBasic()+ public function testGetMapBasic(): void{$one = new Category;$one->id = 9;diff --git a/tests/Unit/Import/Mapper/OpposingAccountIbansTest.php b/tests/Unit/Import/Mapper/OpposingAccountIbansTest.phpindex 621c9432d5..97020d3e00 100644--- a/tests/Unit/Import/Mapper/OpposingAccountIbansTest.php+++ b/tests/Unit/Import/Mapper/OpposingAccountIbansTest.php@@ -38,7 +38,7 @@ class OpposingAccountIbansTest extends TestCase/*** @covers \FireflyIII\Import\Mapper\OpposingAccountIbans::getMap()*/- public function testGetMapBasic()+ public function testGetMapBasic(): void{$one = new Account;$one->id = 21;diff --git a/tests/Unit/Import/Mapper/OpposingAccountsTest.php b/tests/Unit/Import/Mapper/OpposingAccountsTest.phpindex 765108a471..381ab1426e 100644--- a/tests/Unit/Import/Mapper/OpposingAccountsTest.php+++ b/tests/Unit/Import/Mapper/OpposingAccountsTest.php@@ -38,7 +38,7 @@ class OpposingAccountsTest extends TestCase/*** @covers \FireflyIII\Import\Mapper\OpposingAccounts::getMap()*/- public function testGetMapBasic()+ public function testGetMapBasic(): void{$one = new Account;$one->id = 13;diff --git a/tests/Unit/Import/Mapper/TagsTest.php b/tests/Unit/Import/Mapper/TagsTest.phpindex ad03c5b59e..57a2641e83 100644--- a/tests/Unit/Import/Mapper/TagsTest.php+++ b/tests/Unit/Import/Mapper/TagsTest.php@@ -37,7 +37,7 @@ class TagsTest extends TestCase/*** @covers \FireflyIII\Import\Mapper\Tags::getMap()*/- public function testGetMapBasic()+ public function testGetMapBasic(): void{$one = new Tag;$one->id = 12;diff --git a/tests/Unit/Import/Mapper/TransactionCurrenciesTest.php b/tests/Unit/Import/Mapper/TransactionCurrenciesTest.phpindex 61a37a8207..0258897f79 100644--- a/tests/Unit/Import/Mapper/TransactionCurrenciesTest.php+++ b/tests/Unit/Import/Mapper/TransactionCurrenciesTest.php@@ -37,7 +37,7 @@ class TransactionCurrenciesTest extends TestCase/*** @covers \FireflyIII\Import\Mapper\TransactionCurrencies::getMap()*/- public function testGetMapBasic()+ public function testGetMapBasic(): void{$one = new TransactionCurrency;$one->id = 9;diff --git a/tests/Unit/Import/MapperPreProcess/TagsCommaTest.php b/tests/Unit/Import/MapperPreProcess/TagsCommaTest.phpindex 579031ba19..81a3a4eb42 100644--- a/tests/Unit/Import/MapperPreProcess/TagsCommaTest.php+++ b/tests/Unit/Import/MapperPreProcess/TagsCommaTest.php@@ -35,7 +35,7 @@ class TagsCommaTest extends TestCase/*** \FireflyIII\Import\MapperPreProcess\TagsComma::run*/- public function testBasic()+ public function testBasic(): void{$input = 'some,tags, with, spaces ,and,without,,';$output = ['some', 'tags', 'with', 'spaces', 'and', 'without'];diff --git a/tests/Unit/Import/MapperPreProcess/TagsSpaceTest.php b/tests/Unit/Import/MapperPreProcess/TagsSpaceTest.phpindex 9c9b1e1627..a6508657be 100644--- a/tests/Unit/Import/MapperPreProcess/TagsSpaceTest.php+++ b/tests/Unit/Import/MapperPreProcess/TagsSpaceTest.php@@ -35,7 +35,7 @@ class TagsSpaceTest extends TestCase/*** \FireflyIII\Import\MapperPreProcess\TagsSpace::run*/- public function testBasic()+ public function testBasic(): void{$input = 'some tags with spaces,and without ';$output = ['some', 'tags', 'with', 'spaces,and', 'without'];diff --git a/tests/Unit/Middleware/AuthenticateTest.php b/tests/Unit/Middleware/AuthenticateTest.phpindex 6e6eacf55c..ad316d6194 100644--- a/tests/Unit/Middleware/AuthenticateTest.php+++ b/tests/Unit/Middleware/AuthenticateTest.php@@ -35,7 +35,7 @@ class AuthenticateTest extends TestCase/*** @covers \FireflyIII\Http\Middleware\Authenticate*/- public function testMiddleware()+ public function testMiddleware(): void{Log::debug('Now at testMiddleware');$response = $this->get('/_test/authenticate');@@ -46,7 +46,7 @@ class AuthenticateTest extends TestCase/*** @covers \FireflyIII\Http\Middleware\Authenticate*/- public function testMiddlewareAjax()+ public function testMiddlewareAjax(): void{Log::debug('Now at testMiddlewareAjax');$server = ['HTTP_X-Requested-With' => 'XMLHttpRequest'];@@ -57,7 +57,7 @@ class AuthenticateTest extends TestCase/*** @covers \FireflyIII\Http\Middleware\Authenticate*/- public function testMiddlewareAuth()+ public function testMiddlewareAuth(): void{Log::debug('Now at testMiddlewareAuth');$this->be($this->user());@@ -68,7 +68,7 @@ class AuthenticateTest extends TestCase/*** @covers \FireflyIII\Http\Middleware\Authenticate*/- public function testMiddlewareBlockedUser()+ public function testMiddlewareBlockedUser(): void{Log::debug('Now at testMiddlewareBlockedUser');$user = $this->user();@@ -85,7 +85,7 @@ class AuthenticateTest extends TestCase/*** @covers \FireflyIII\Http\Middleware\Authenticate*/- public function testMiddlewareEmail()+ public function testMiddlewareEmail(): void{Log::debug('Now at testMiddlewareEmail');$user = $this->user();diff --git a/tests/Unit/Middleware/AuthenticateTwoFactorTest.php b/tests/Unit/Middleware/AuthenticateTwoFactorTest.phpindex 964ddf5dc1..2e67ebf634 100644--- a/tests/Unit/Middleware/AuthenticateTwoFactorTest.php+++ b/tests/Unit/Middleware/AuthenticateTwoFactorTest.php@@ -38,7 +38,7 @@ class AuthenticateTwoFactorTest extends TestCase/*** @covers \FireflyIII\Http\Middleware\AuthenticateTwoFactor::handle*/- public function testMiddleware()+ public function testMiddleware(): void{$this->withoutExceptionHandling();$response = $this->get('/_test/authenticate');@@ -56,7 +56,7 @@ class AuthenticateTwoFactorTest extends TestCase** @covers \FireflyIII\Http\Middleware\AuthenticateTwoFactor::handle*/- public function testMiddlewareNoTwoFA()+ public function testMiddlewareNoTwoFA(): void{$this->withoutExceptionHandling();$user = $this->user();@@ -87,7 +87,7 @@ class AuthenticateTwoFactorTest extends TestCase** @covers \FireflyIII\Http\Middleware\AuthenticateTwoFactor::handle*/- public function testMiddlewareTwoFAAuthed()+ public function testMiddlewareTwoFAAuthed(): void{$this->withoutExceptionHandling();$user = $this->user();@@ -120,7 +120,7 @@ class AuthenticateTwoFactorTest extends TestCase** @covers \FireflyIII\Http\Middleware\AuthenticateTwoFactor::handle*/- public function testMiddlewareTwoFANoSecret()+ public function testMiddlewareTwoFANoSecret(): void{$this->withoutExceptionHandling();$user = $this->user();@@ -151,7 +151,7 @@ class AuthenticateTwoFactorTest extends TestCase** @covers \FireflyIII\Http\Middleware\AuthenticateTwoFactor::handle*/- public function testMiddlewareTwoFASecret()+ public function testMiddlewareTwoFASecret(): void{$this->withoutExceptionHandling();$user = $this->user();diff --git a/tests/Unit/Middleware/IsAdminTest.php b/tests/Unit/Middleware/IsAdminTest.phpindex 7d2726834a..7ac02d2ab4 100644--- a/tests/Unit/Middleware/IsAdminTest.php+++ b/tests/Unit/Middleware/IsAdminTest.php@@ -36,7 +36,7 @@ class IsAdminTest extends TestCase/*** @covers \FireflyIII\Http\Middleware\IsAdmin::handle*/- public function testMiddleware()+ public function testMiddleware(): void{$this->withoutExceptionHandling();$response = $this->get('/_test/is-admin');@@ -47,7 +47,7 @@ class IsAdminTest extends TestCase/*** @covers \FireflyIII\Http\Middleware\IsAdmin::handle*/- public function testMiddlewareAjax()+ public function testMiddlewareAjax(): void{$server = ['HTTP_X-Requested-With' => 'XMLHttpRequest'];$this->withoutExceptionHandling();@@ -58,7 +58,7 @@ class IsAdminTest extends TestCase/*** @covers \FireflyIII\Http\Middleware\IsAdmin::handle*/- public function testMiddlewareNotOwner()+ public function testMiddlewareNotOwner(): void{$this->withoutExceptionHandling();$this->be($this->emptyUser());@@ -70,7 +70,7 @@ class IsAdminTest extends TestCase/*** @covers \FireflyIII\Http\Middleware\IsAdmin::handle*/- public function testMiddlewareOwner()+ public function testMiddlewareOwner(): void{$this->be($this->user());$this->withoutExceptionHandling();diff --git a/tests/Unit/Middleware/IsDemoUserTest.php b/tests/Unit/Middleware/IsDemoUserTest.phpindex 6e695cdfd9..c2d0ad4f5f 100644--- a/tests/Unit/Middleware/IsDemoUserTest.php+++ b/tests/Unit/Middleware/IsDemoUserTest.php@@ -37,7 +37,7 @@ class IsDemoUserTest extends TestCase/*** @covers \FireflyIII\Http\Middleware\IsDemoUser*/- public function testMiddlewareAuthenticated()+ public function testMiddlewareAuthenticated(): void{$this->be($this->user());$response = $this->get('/_test/is-demo');@@ -47,7 +47,7 @@ class IsDemoUserTest extends TestCase/*** @covers \FireflyIII\Http\Middleware\IsDemoUser*/- public function testMiddlewareNotAuthenticated()+ public function testMiddlewareNotAuthenticated(): void{$response = $this->get('/_test/is-demo');$this->assertEquals(Response::HTTP_OK, $response->getStatusCode());@@ -56,7 +56,7 @@ class IsDemoUserTest extends TestCase/*** @covers \FireflyIII\Http\Middleware\IsDemoUser*/- public function testMiddlewareIsDemoUser()+ public function testMiddlewareIsDemoUser(): void{$this->be($this->demoUser());$response = $this->get('/_test/is-demo');diff --git a/tests/Unit/Middleware/IsSandstormUserTest.php b/tests/Unit/Middleware/IsSandstormUserTest.phpindex 60cf2b68ad..c53fbe484d 100644--- a/tests/Unit/Middleware/IsSandstormUserTest.php+++ b/tests/Unit/Middleware/IsSandstormUserTest.php@@ -36,7 +36,7 @@ class IsSandstormUserTest extends TestCase/*** @covers \FireflyIII\Http\Middleware\IsSandStormUser::handle*/- public function testMiddlewareNotAuthenticated()+ public function testMiddlewareNotAuthenticated(): void{$this->withoutExceptionHandling();$response = $this->get('/_test/is-sandstorm');@@ -46,7 +46,7 @@ class IsSandstormUserTest extends TestCase/*** @covers \FireflyIII\Http\Middleware\IsSandStormUser::handle*/- public function testMiddlewareNotSandStorm()+ public function testMiddlewareNotSandStorm(): void{$this->withoutExceptionHandling();$this->be($this->user());@@ -57,7 +57,7 @@ class IsSandstormUserTest extends TestCase/*** @covers \FireflyIII\Http\Middleware\IsSandStormUser::handle*/- public function testMiddlewareSandstorm()+ public function testMiddlewareSandstorm(): void{putenv('SANDSTORM=1');$this->withoutExceptionHandling();diff --git a/tests/Unit/Middleware/RangeTest.php b/tests/Unit/Middleware/RangeTest.phpindex 907fe19ace..82302099b4 100644--- a/tests/Unit/Middleware/RangeTest.php+++ b/tests/Unit/Middleware/RangeTest.php@@ -38,7 +38,7 @@ class RangeTest extends TestCase/*** @covers \FireflyIII\Http\Middleware\Range*/- public function testMiddlewareAuthenticated()+ public function testMiddlewareAuthenticated(): void{$repository = $this->mock(JournalRepositoryInterface::class);$repository->shouldReceive('firstNull')->andReturn(TransactionJournal::first());@@ -56,7 +56,7 @@ class RangeTest extends TestCase/*** @covers \FireflyIII\Http\Middleware\Range*/- public function testMiddlewareNotAuthenticated()+ public function testMiddlewareNotAuthenticated(): void{$this->withoutExceptionHandling();$response = $this->get('/_test/range');diff --git a/tests/Unit/Middleware/RedirectIf2FAAuthenticatedTest.php b/tests/Unit/Middleware/RedirectIf2FAAuthenticatedTest.phpindex 7a4075c7b8..cf5cfa2e89 100644--- a/tests/Unit/Middleware/RedirectIf2FAAuthenticatedTest.php+++ b/tests/Unit/Middleware/RedirectIf2FAAuthenticatedTest.php@@ -38,7 +38,7 @@ class RedirectIf2FAAuthenticatedTest extends TestCase/*** @covers \FireflyIII\Http\Middleware\RedirectIfTwoFactorAuthenticated::handle*/- public function testMiddleware()+ public function testMiddleware(): void{$response = $this->get('/_test/authenticate');$this->assertEquals(Response::HTTP_OK, $response->getStatusCode());@@ -47,7 +47,7 @@ class RedirectIf2FAAuthenticatedTest extends TestCase/*** @covers \FireflyIII\Http\Middleware\RedirectIfTwoFactorAuthenticated::handle*/- public function testMiddlewareAuthenticated()+ public function testMiddlewareAuthenticated(): void{// pref for has 2fa is true$preference = new Preference;@@ -71,7 +71,7 @@ class RedirectIf2FAAuthenticatedTest extends TestCase/*** @covers \FireflyIII\Http\Middleware\RedirectIfTwoFactorAuthenticated::handle*/- public function testMiddlewareLightAuth()+ public function testMiddlewareLightAuth(): void{$this->be($this->user());$response = $this->get('/_test/authenticate');diff --git a/tests/Unit/Middleware/RedirectIfAuthenticatedTest.php b/tests/Unit/Middleware/RedirectIfAuthenticatedTest.phpindex 3bbd7a4d00..bbfcc6e415 100644--- a/tests/Unit/Middleware/RedirectIfAuthenticatedTest.php+++ b/tests/Unit/Middleware/RedirectIfAuthenticatedTest.php@@ -36,7 +36,7 @@ class RedirectIfAuthenticatedTest extends TestCase/*** @covers \FireflyIII\Http\Middleware\RedirectIfAuthenticated::handle*/- public function testMiddleware()+ public function testMiddleware(): void{$response = $this->get('/_test/authenticate');$this->assertEquals(Response::HTTP_OK, $response->getStatusCode());@@ -45,7 +45,7 @@ class RedirectIfAuthenticatedTest extends TestCase/*** @covers \FireflyIII\Http\Middleware\RedirectIfAuthenticated::handle*/- public function testMiddlewareAuthenticated()+ public function testMiddlewareAuthenticated(): void{$this->be($this->user());$response = $this->get('/_test/authenticate');diff --git a/tests/Unit/Services/Internal/Destroy/AccountDestroyServiceTest.php b/tests/Unit/Services/Internal/Destroy/AccountDestroyServiceTest.phpindex aaefb028fb..1777874cf8 100644--- a/tests/Unit/Services/Internal/Destroy/AccountDestroyServiceTest.php+++ b/tests/Unit/Services/Internal/Destroy/AccountDestroyServiceTest.php@@ -37,7 +37,7 @@ class AccountDestroyServiceTest extends TestCase/*** @covers \FireflyIII\Services\Internal\Destroy\AccountDestroyService*/- public function testDestroyBasic()+ public function testDestroyBasic(): void{$account = Account::create(['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 1000),@@ -53,7 +53,7 @@ class AccountDestroyServiceTest extends TestCase/*** @covers \FireflyIII\Services\Internal\Destroy\AccountDestroyService*/- public function testDestroyDontMove()+ public function testDestroyDontMove(): void{// create objects:$account = Account::create(@@ -76,7 +76,7 @@ class AccountDestroyServiceTest extends TestCase/*** @covers \FireflyIII\Services\Internal\Destroy\AccountDestroyService*/- public function testDestroyMove()+ public function testDestroyMove(): void{$account = Account::create(['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 1000),diff --git a/tests/Unit/Services/Internal/Update/AccountUpdateServiceTest.php b/tests/Unit/Services/Internal/Update/AccountUpdateServiceTest.phpindex 93f3a7d6b8..20eb24074f 100644--- a/tests/Unit/Services/Internal/Update/AccountUpdateServiceTest.php+++ b/tests/Unit/Services/Internal/Update/AccountUpdateServiceTest.php@@ -42,7 +42,7 @@ class AccountUpdateServiceTest extends TestCase* @covers \FireflyIII\Services\Internal\Update\AccountUpdateService* @covers \FireflyIII\Services\Internal\Support\AccountServiceTrait*/- public function testDeleteExistingIB()+ public function testDeleteExistingIB(): void{/** @var Account $account */$account = Account::create(@@ -91,7 +91,7 @@ class AccountUpdateServiceTest extends TestCase* @covers \FireflyIII\Services\Internal\Update\AccountUpdateService* @covers \FireflyIII\Services\Internal\Support\AccountServiceTrait*/- public function testUpdateBasic()+ public function testUpdateBasic(): void{/** @var Account $account */$account = $this->user()->accounts()->first();@@ -114,7 +114,7 @@ class AccountUpdateServiceTest extends TestCase* @covers \FireflyIII\Services\Internal\Update\AccountUpdateService* @covers \FireflyIII\Services\Internal\Support\AccountServiceTrait*/- public function testUpdateBasicEmptyNote()+ public function testUpdateBasicEmptyNote(): void{/** @var Account $account */$account = $this->user()->accounts()->first();@@ -139,7 +139,7 @@ class AccountUpdateServiceTest extends TestCase* @covers \FireflyIII\Services\Internal\Update\AccountUpdateService* @covers \FireflyIII\Services\Internal\Support\AccountServiceTrait*/- public function testUpdateBasicExistingNote()+ public function testUpdateBasicExistingNote(): void{/** @var Account $account */$account = $this->user()->accounts()->first();@@ -170,7 +170,7 @@ class AccountUpdateServiceTest extends TestCase* @covers \FireflyIII\Services\Internal\Update\AccountUpdateService* @covers \FireflyIII\Services\Internal\Support\AccountServiceTrait*/- public function testUpdateExistingIB()+ public function testUpdateExistingIB(): void{/** @var Account $account */$account = Account::create(@@ -222,7 +222,7 @@ class AccountUpdateServiceTest extends TestCase* @covers \FireflyIII\Services\Internal\Update\AccountUpdateService* @covers \FireflyIII\Services\Internal\Support\AccountServiceTrait*/- public function testUpdateExistingIBZero()+ public function testUpdateExistingIBZero(): void{$deleteService = $this->mock(JournalDestroyService::class);$deleteService->shouldReceive('destroy')->once();@@ -277,7 +277,7 @@ class AccountUpdateServiceTest extends TestCase* @covers \FireflyIII\Services\Internal\Update\AccountUpdateService* @covers \FireflyIII\Services\Internal\Support\AccountServiceTrait*/- public function testUpdateNewIB()+ public function testUpdateNewIB(): void{/** @var Account $account */$account = Account::create(diff --git a/tests/Unit/Services/Internal/Update/JournalUpdateServiceTest.php b/tests/Unit/Services/Internal/Update/JournalUpdateServiceTest.phpindex 80bdd4b213..170d960fdd 100644--- a/tests/Unit/Services/Internal/Update/JournalUpdateServiceTest.php+++ b/tests/Unit/Services/Internal/Update/JournalUpdateServiceTest.php@@ -44,7 +44,7 @@ class JournalUpdateServiceTest extends TestCase* @covers \FireflyIII\Services\Internal\Update\JournalUpdateService* @covers \FireflyIII\Services\Internal\Support\JournalServiceTrait*/- public function testUpdateBasic()+ public function testUpdateBasic(): void{// mock other stuff:$transactionFactory = $this->mock(TransactionFactory::class);@@ -86,7 +86,7 @@ class JournalUpdateServiceTest extends TestCase* @covers \FireflyIII\Services\Internal\Update\JournalUpdateService* @covers \FireflyIII\Services\Internal\Support\JournalServiceTrait*/- public function testUpdateBasicEmptyNote()+ public function testUpdateBasicEmptyNote(): void{// mock other stuff:$transactionFactory = $this->mock(TransactionFactory::class);@@ -128,7 +128,7 @@ class JournalUpdateServiceTest extends TestCase/*** @covers \FireflyIII\Services\Internal\Update\JournalUpdateService*/- public function testUpdateBudget()+ public function testUpdateBudget(): void{$budget = $this->user()->budgets()->first();$service = $this->mock(TransactionUpdateService::class);@@ -151,7 +151,7 @@ class JournalUpdateServiceTest extends TestCase/*** @covers \FireflyIII\Services\Internal\Update\JournalUpdateService*/- public function testUpdateCategory()+ public function testUpdateCategory(): void{$service = $this->mock(TransactionUpdateService::class);$service->shouldReceive('setUser');@@ -175,7 +175,7 @@ class JournalUpdateServiceTest extends TestCase* @covers \FireflyIII\Services\Internal\Update\JournalUpdateService* @covers \FireflyIII\Services\Internal\Support\JournalServiceTrait*/- public function testUpdateLotsOfTransactions()+ public function testUpdateLotsOfTransactions(): void{// mock other stuff:$transactionFactory = $this->mock(TransactionFactory::class);diff --git a/tests/Unit/Services/Internal/Update/TransactionUpdateServiceTest.php b/tests/Unit/Services/Internal/Update/TransactionUpdateServiceTest.phpindex 9396579f2c..1c9b88a109 100644--- a/tests/Unit/Services/Internal/Update/TransactionUpdateServiceTest.php+++ b/tests/Unit/Services/Internal/Update/TransactionUpdateServiceTest.php@@ -39,7 +39,7 @@ class TransactionUpdateServiceTest extends TestCase/*** @covers \FireflyIII\Services\Internal\Update\TransactionUpdateService*/- public function testReconcile()+ public function testReconcile(): void{$transaction = $this->user()->transactions()->inRandomOrder()->first();@@ -55,7 +55,7 @@ class TransactionUpdateServiceTest extends TestCase* @covers \FireflyIII\Services\Internal\Update\TransactionUpdateService* @covers \FireflyIII\Services\Internal\Support\TransactionServiceTrait*/- public function testReconcileNull()+ public function testReconcileNull(): void{/** @var TransactionUpdateService $service */$service = app(TransactionUpdateService::class);@@ -68,7 +68,7 @@ class TransactionUpdateServiceTest extends TestCase* @covers \FireflyIII\Services\Internal\Update\TransactionUpdateService* @covers \FireflyIII\Services\Internal\Support\TransactionServiceTrait*/- public function testUpdateBudget()+ public function testUpdateBudget(): void{/** @var Transaction $source */@@ -92,7 +92,7 @@ class TransactionUpdateServiceTest extends TestCase* @covers \FireflyIII\Services\Internal\Update\TransactionUpdateService* @covers \FireflyIII\Services\Internal\Support\TransactionServiceTrait*/- public function testUpdateCategory()+ public function testUpdateCategory(): void{/** @var Transaction $source */@@ -116,7 +116,7 @@ class TransactionUpdateServiceTest extends TestCase* @covers \FireflyIII\Services\Internal\Update\TransactionUpdateService* @covers \FireflyIII\Services\Internal\Support\TransactionServiceTrait*/- public function testUpdateDestinationBasic()+ public function testUpdateDestinationBasic(): void{/** @var Transaction $source */$source = $this->user()->transactions()->where('amount', '>', 0)->inRandomOrder()->first();@@ -155,7 +155,7 @@ class TransactionUpdateServiceTest extends TestCase* @covers \FireflyIII\Services\Internal\Update\TransactionUpdateService* @covers \FireflyIII\Services\Internal\Support\TransactionServiceTrait*/- public function testUpdateDestinationForeign()+ public function testUpdateDestinationForeign(): void{/** @var Transaction $source */$source = $this->user()->transactions()->where('amount', '>', 0)->inRandomOrder()->first();@@ -198,7 +198,7 @@ class TransactionUpdateServiceTest extends TestCase* @covers \FireflyIII\Services\Internal\Update\TransactionUpdateService* @covers \FireflyIII\Services\Internal\Support\TransactionServiceTrait*/- public function testUpdateSourceBasic()+ public function testUpdateSourceBasic(): void{/** @var Transaction $source */$source = $this->user()->transactions()->where('amount', '<', 0)->inRandomOrder()->first();diff --git a/tests/Unit/Support/Import/Configuration/File/ConfigureMappingHandlerTest.php b/tests/Unit/Support/Import/Configuration/File/ConfigureMappingHandlerTest.phpindex 558c4421b2..3d12770d17 100644--- a/tests/Unit/Support/Import/Configuration/File/ConfigureMappingHandlerTest.php+++ b/tests/Unit/Support/Import/Configuration/File/ConfigureMappingHandlerTest.php@@ -26,6 +26,7 @@ namespace Tests\Unit\Support\Import\Configuration\File;use FireflyIII\Exceptions\FireflyException;use FireflyIII\Helpers\Attachments\AttachmentHelperInterface;use FireflyIII\Import\Mapper\Budgets;+use FireflyIII\Import\MapperPreProcess\TagsSpace;use FireflyIII\Import\Specifics\IngDescription;use FireflyIII\Models\Attachment;use FireflyIII\Models\ImportJob;@@ -333,7 +334,7 @@ class ConfigureMappingHandlerTest extends TestCase$job->save();$combinations = [- ['role' => 'tags-space', 'expected' => '\\FireflyIII\\Import\\MapperPreProcess\\TagsSpace'], // tags- space has a pre-processor. Return it.+ ['role' => 'tags-space', 'expected' => TagsSpace::class], // tags- space has a pre-processor. Return it.['role' => 'description', 'expected' => ''], // description has not.['role' => 'no-such-role', 'expected' => ''], // not existing role has not.];diff --git a/tests/Unit/Support/Import/Placeholder/ImportTransactionTest.php b/tests/Unit/Support/Import/Placeholder/ImportTransactionTest.phpnew file mode 100644index 0000000000..05affa9016--- /dev/null+++ b/tests/Unit/Support/Import/Placeholder/ImportTransactionTest.php@@ -0,0 +1,748 @@+<?php+/**+ * ImportTransactionTest.php+ * Copyright (c) 2018 [email protected]+ *+ * This file is part of Firefly III.+ *+ * Firefly III is free software: you can redistribute it and/or modify+ * it under the terms of the GNU General Public License as published by+ * the Free Software Foundation, either version 3 of the License, or+ * (at your option) any later version.+ *+ * Firefly III 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 General Public License for more details.+ *+ * You should have received a copy of the GNU General Public License+ * along with Firefly III. If not, see <http://www.gnu.org/licenses/>.+ */++declare(strict_types=1);++namespace Tests\Unit\Support\Import\Placeholder;+++use FireflyIII\Exceptions\FireflyException;+use FireflyIII\Support\Import\Placeholder\ColumnValue;+use FireflyIII\Support\Import\Placeholder\ImportTransaction;+use Tests\TestCase;++/**+ * Class ImportTransactionTest+ */+class ImportTransactionTest extends TestCase+{+ /**+ * Test what happens when you set the account-id using a ColumnValue.+ * Since this field can be mapped. Test with both the mapped and unmapped variant.+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testACVAccountIdMapped(): void+ {+ $columnValue = new ColumnValue;+ $columnValue->setRole('account-id');+ $columnValue->setOriginalRole('account-name');+ $columnValue->setValue('Checking Account');+ $columnValue->setMappedValue(1);++ $importTransaction = new ImportTransaction;+ $this->assertEquals(0, $importTransaction->accountId);+ try {+ $importTransaction->addColumnValue($columnValue);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }+ $this->assertEquals($columnValue->getMappedValue(), $importTransaction->accountId);+ }++ /**+ * Test what happens when you set the account-id using a ColumnValue.+ * Since this field can be mapped. Test with both the mapped and unmapped variant.+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testACVAccountIdUnmapped(): void+ {+ $columnValue = new ColumnValue;+ $columnValue->setRole('account-id');+ $columnValue->setValue('1');++ $importTransaction = new ImportTransaction;+ $this->assertEquals(0, $importTransaction->accountId);+ try {+ $importTransaction->addColumnValue($columnValue);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }+ $this->assertEquals((int)$columnValue->getValue(), $importTransaction->accountId);+ }++ /**+ * Test what happens when you set the bill-id using a ColumnValue.+ * Since this field can be mapped. Test with both the mapped and unmapped variant.+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testACVBillIdMapped(): void+ {+ $columnValue = new ColumnValue;+ $columnValue->setRole('bill-id');+ $columnValue->setOriginalRole('bill-name');+ $columnValue->setValue('Some Bill');+ $columnValue->setMappedValue(2);++ $importTransaction = new ImportTransaction;+ $this->assertEquals(0, $importTransaction->billId);+ try {+ $importTransaction->addColumnValue($columnValue);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }+ $this->assertEquals($columnValue->getMappedValue(), $importTransaction->billId);+ }++ /**+ * Test what happens when you set the bill-id using a ColumnValue.+ * Since this field can be mapped. Test with both the mapped and unmapped variant.+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testACVBillIdUnmapped(): void+ {+ $columnValue = new ColumnValue;+ $columnValue->setRole('bill-id');+ $columnValue->setValue('2');++ $importTransaction = new ImportTransaction;+ $this->assertEquals(0, $importTransaction->billId);+ try {+ $importTransaction->addColumnValue($columnValue);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }+ $this->assertEquals((int)$columnValue->getValue(), $importTransaction->billId);+ }++ /**+ * Test what happens when you set the budget-id using a ColumnValue.+ * Since this field can be mapped. Test with both the mapped and unmapped variant.+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testACVBudgetIdMapped(): void+ {+ $columnValue = new ColumnValue;+ $columnValue->setRole('budget-id');+ $columnValue->setOriginalRole('budget-name');+ $columnValue->setValue('Some Budget');+ $columnValue->setMappedValue(3);++ $importTransaction = new ImportTransaction;+ $this->assertEquals(0, $importTransaction->budgetId);+ try {+ $importTransaction->addColumnValue($columnValue);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }+ $this->assertEquals($columnValue->getMappedValue(), $importTransaction->budgetId);+ }++ /**+ * Test what happens when you set the budget-id using a ColumnValue.+ * Since this field can be mapped. Test with both the mapped and unmapped variant.+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testACVBudgetIdUnmapped(): void+ {+ $columnValue = new ColumnValue;+ $columnValue->setRole('budget-id');+ $columnValue->setValue('3');++ $importTransaction = new ImportTransaction;+ $this->assertEquals(0, $importTransaction->budgetId);+ try {+ $importTransaction->addColumnValue($columnValue);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }+ $this->assertEquals((int)$columnValue->getValue(), $importTransaction->budgetId);+ }++ /**+ * Test what happens when you set the category-id using a ColumnValue.+ * Since this field can be mapped. Test with both the mapped and unmapped variant.+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testACVCategoryIdMapped(): void+ {+ $columnValue = new ColumnValue;+ $columnValue->setRole('category-id');+ $columnValue->setOriginalRole('category-name');+ $columnValue->setValue('Some category');+ $columnValue->setMappedValue(5);++ $importTransaction = new ImportTransaction;+ $this->assertEquals(0, $importTransaction->categoryId);+ try {+ $importTransaction->addColumnValue($columnValue);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }+ $this->assertEquals($columnValue->getMappedValue(), $importTransaction->categoryId);+ }++ /**+ * Test what happens when you set the category-id using a ColumnValue.+ * Since this field can be mapped. Test with both the mapped and unmapped variant.+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testACVCategoryIdUnmapped(): void+ {+ $columnValue = new ColumnValue;+ $columnValue->setRole('category-id');+ $columnValue->setValue('5');++ $importTransaction = new ImportTransaction;+ $this->assertEquals(0, $importTransaction->categoryId);+ try {+ $importTransaction->addColumnValue($columnValue);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }+ $this->assertEquals((int)$columnValue->getValue(), $importTransaction->categoryId);+ }++ /**+ * Test what happens when you set the currency-id using a ColumnValue.+ * Since this field can be mapped. Test with both the mapped and unmapped variant.+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testACVCurrencyIdMapped(): void+ {+ $columnValue = new ColumnValue;+ $columnValue->setRole('currency-id');+ $columnValue->setOriginalRole('currency-code');+ $columnValue->setValue('EUR');+ $columnValue->setMappedValue(4);++ $importTransaction = new ImportTransaction;+ $this->assertEquals(0, $importTransaction->currencyId);+ try {+ $importTransaction->addColumnValue($columnValue);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }+ $this->assertEquals($columnValue->getMappedValue(), $importTransaction->currencyId);+ }++ /**+ * Test what happens when you set the currency-id using a ColumnValue.+ * Since this field can be mapped. Test with both the mapped and unmapped variant.+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testACVCurrencyIdUnmapped(): void+ {+ $columnValue = new ColumnValue;+ $columnValue->setRole('currency-id');+ $columnValue->setValue('4');++ $importTransaction = new ImportTransaction;+ $this->assertEquals(0, $importTransaction->currencyId);+ try {+ $importTransaction->addColumnValue($columnValue);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }+ $this->assertEquals((int)$columnValue->getValue(), $importTransaction->currencyId);+ }++ /**+ * Test what happens when you set the foreign-currency-id using a ColumnValue.+ * Since this field can be mapped. Test with both the mapped and unmapped variant.+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testACVForeignCurrencyIdMapped(): void+ {+ $columnValue = new ColumnValue;+ $columnValue->setRole('foreign-currency-id');+ $columnValue->setOriginalRole('foreign-currency-code');+ $columnValue->setValue('USD');+ $columnValue->setMappedValue(6);++ $importTransaction = new ImportTransaction;+ $this->assertEquals(0, $importTransaction->foreignCurrencyId);+ try {+ $importTransaction->addColumnValue($columnValue);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }+ $this->assertEquals($columnValue->getMappedValue(), $importTransaction->foreignCurrencyId);+ }++ /**+ * Test what happens when you set the category-id using a ColumnValue.+ * Since this field can be mapped. Test with both the mapped and unmapped variant.+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testACVForeignCurrencyIdUnmapped(): void+ {+ $columnValue = new ColumnValue;+ $columnValue->setRole('foreign-currency-id');+ $columnValue->setValue('6');++ $importTransaction = new ImportTransaction;+ $this->assertEquals(0, $importTransaction->foreignCurrencyId);+ try {+ $importTransaction->addColumnValue($columnValue);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }+ $this->assertEquals((int)$columnValue->getValue(), $importTransaction->foreignCurrencyId);+ }+++ /**+ * Test what happens when you set the opposing-id using a ColumnValue.+ * Since this field can be mapped. Test with both the mapped and unmapped variant.+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testACVOpposingIdMapped(): void+ {+ $columnValue = new ColumnValue;+ $columnValue->setRole('opposing-id');+ $columnValue->setOriginalRole('opposing-name');+ $columnValue->setValue('Some Opposing');+ $columnValue->setMappedValue(7);++ $importTransaction = new ImportTransaction;+ $this->assertEquals(0, $importTransaction->opposingId);+ try {+ $importTransaction->addColumnValue($columnValue);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }+ $this->assertEquals($columnValue->getMappedValue(), $importTransaction->opposingId);+ }++ /**+ * Test what happens when you set the opposing-id using a ColumnValue.+ * Since this field can be mapped. Test with both the mapped and unmapped variant.+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testACVOpposingIdUnmapped(): void+ {+ $columnValue = new ColumnValue;+ $columnValue->setRole('opposing-id');+ $columnValue->setValue('7');++ $importTransaction = new ImportTransaction;+ $this->assertEquals(0, $importTransaction->opposingId);+ try {+ $importTransaction->addColumnValue($columnValue);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }+ $this->assertEquals((int)$columnValue->getValue(), $importTransaction->opposingId);+ }++ /**+ * Test various unmapped fields, and the result that the ImportTransaction should display.+ *+ * Put into one big test to save time.+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testACVOtherValues(): void+ {+ $tests = [+ 'account-iban' => 'accountIban',+ 'account-name' => 'accountName',+ 'account-bic' => 'accountBic',+ 'account-number' => 'accountNumber',+ 'amount_debit' => 'amountDebit',+ 'amount_credit' => 'amountCredit',+ 'amount' => 'amount',+ 'amount_foreign' => 'foreignAmount',+ 'bill-name' => 'billName',+ 'budget-name' => 'budgetName',+ 'category-name' => 'categoryName',+ 'currency-code' => 'currencyCode',+ 'currency-name' => 'currencyName',+ 'currency-symbol' => 'currencySymbol',+ 'external-id' => 'externalId',+ 'foreign-currency-code' => 'foreignCurrencyCode',+ 'date-transaction' => 'date',+ 'opposing-iban' => 'opposingIban',+ 'opposing-name' => 'opposingName',+ 'opposing-bic' => 'opposingBic',+ 'opposing-number' => 'opposingNumber',+ ];+ foreach ($tests as $role => $field) {+ // generate random value+ $value = bin2hex(random_bytes(16));++ // put into column value:+ $columnValue = new ColumnValue;+ $columnValue->setRole($role);+ $columnValue->setValue($value);++ // first test should always return NULL+ $importTransaction = new ImportTransaction;+ $this->assertNull($importTransaction->$field);+++ try {+ $importTransaction->addColumnValue($columnValue);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }++ // after setting, should return value.+ $this->assertEquals($value, $importTransaction->$field);++ }+++ }++ /**+ * Basic amount info. Should return something like '1.0'.+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testCalculateAmountBasic(): void+ {+ $importTransaction = new ImportTransaction;+ $importTransaction->amount = '1.23';+ try {+ $this->assertEquals('1.23', $importTransaction->calculateAmount());+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }+ }++ /**+ * Basic amount info. Should return something like '1.0'.+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testCalculateAmountCredit(): void+ {+ $importTransaction = new ImportTransaction;+ $importTransaction->amountCredit = '1.56';+ try {+ $this->assertEquals('1.56', $importTransaction->calculateAmount());+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }+ }++ /**+ * Basic amount info. Should return something like '1.0'.+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testCalculateAmountDebit(): void+ {+ $importTransaction = new ImportTransaction;+ $importTransaction->amountDebit = '1.01';+ try {+ $this->assertEquals('-1.01', $importTransaction->calculateAmount());+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }+ }++ /**+ * With no amount data, object should return ''+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testCalculateAmountEmpty(): void+ {+ $importTransaction = new ImportTransaction;+ try {+ $this->assertEquals('', $importTransaction->calculateAmount());+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }+ }++ /**+ * Basic amount info with negative modifier (Rabobank D)+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testCalculateAmountNeg(): void+ {+ $importTransaction = new ImportTransaction;+ $importTransaction->amount = '2.99';+ $importTransaction->modifiers['rabo-debit-credit'] = 'D';+ try {+ $this->assertEquals('-2.99', $importTransaction->calculateAmount());+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }+ }++ /**+ * Basic amount info with positive modifier (Rabobank C)+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testCalculateAmountPos(): void+ {+ $importTransaction = new ImportTransaction;+ $importTransaction->amount = '-2.17';+ $importTransaction->modifiers['rabo-debit-credit'] = 'C';+ try {+ $this->assertEquals('2.17', $importTransaction->calculateAmount());+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }+ }++ /**+ * Debit Credit indicator is special.+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testDebitCredit(): void+ {+ $columnValue = new ColumnValue;+ $columnValue->setRole('ing-debit-credit');+ $columnValue->setValue('Af');++ $importTransaction = new ImportTransaction;+ $this->assertCount(0, $importTransaction->modifiers);+ try {+ $importTransaction->addColumnValue($columnValue);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }+ $this->assertCount(1, $importTransaction->modifiers);+ $this->assertEquals('Af', $importTransaction->modifiers['ing-debit-credit']);+ }++ /**+ * Description should be appended.+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testDescription(): void+ {+ $one = new ColumnValue;+ $one->setRole('description');+ $one->setValue('A');++ $two = new ColumnValue;+ $two->setRole('description');+ $two->setValue('B');++ $importTransaction = new ImportTransaction;+ $this->assertEquals('', $importTransaction->description);+ try {+ $importTransaction->addColumnValue($one);+ $importTransaction->addColumnValue($two);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }+ $this->assertEquals('A B', $importTransaction->description);+ }++ /**+ * Basic foreign amount info. Should return something like '1.0'.+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testForeignAmountBasic(): void+ {+ $importTransaction = new ImportTransaction;+ $importTransaction->foreignAmount = '1.23';+ $this->assertEquals('1.23', $importTransaction->calculateForeignAmount());+ }++ /**+ * Basic foreign amount info. Should return something like '1.0'.+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testForeignAmountEmpty(): void+ {+ $importTransaction = new ImportTransaction;+ $this->assertEquals('', $importTransaction->calculateForeignAmount());+ }++ /**+ * Foreign amount with modifier that should make it negative again.+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testForeignAmountModNeg(): void+ {+ $importTransaction = new ImportTransaction;+ $importTransaction->foreignAmount = '6.77';+ $importTransaction->modifiers['rabo-debit-credit'] = 'D';+ $this->assertEquals('-6.77', $importTransaction->calculateForeignAmount());+ }++ /**+ * Foreign amount with modifier that should make it positive again.+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testForeignAmountModPos(): void+ {+ $importTransaction = new ImportTransaction;+ $importTransaction->foreignAmount = '-5.77';+ $importTransaction->modifiers['rabo-debit-credit'] = 'C';+ $this->assertEquals('5.77', $importTransaction->calculateForeignAmount());+ }++ /**+ * Basic foreign amount info. Should return something like '1.0'.+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testForeignAmountNeg(): void+ {+ $importTransaction = new ImportTransaction;+ $importTransaction->foreignAmount = '-4.56';+ $this->assertEquals('-4.56', $importTransaction->calculateForeignAmount());+ }++ /**+ * Ignore field must be ignored.+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testIgnore(): void+ {+ $columnValue = new ColumnValue;+ $columnValue->setRole('_ignore');+ $columnValue->setValue('Bla bla bla');++ $importTransaction = new ImportTransaction;+ try {+ $importTransaction->addColumnValue($columnValue);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }+ $this->assertTrue(true);+ }++ /**+ * Set a meta value, see what happens. Any will do.+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testMetaValue(): void+ {+ $columnValue = new ColumnValue;+ $columnValue->setRole('date-process');+ $columnValue->setValue('2018-01-01');++ $importTransaction = new ImportTransaction;+ $this->assertCount(0, $importTransaction->meta);+ try {+ $importTransaction->addColumnValue($columnValue);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }+ $this->assertCount(1, $importTransaction->meta);+ $this->assertEquals($columnValue->getValue(), $importTransaction->meta['date-process']);+ }++ /**+ * Description should be appended.+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testNote(): void+ {+ $one = new ColumnValue;+ $one->setRole('note');+ $one->setValue('A');++ $two = new ColumnValue;+ $two->setRole('note');+ $two->setValue('B');++ $importTransaction = new ImportTransaction;+ $this->assertEquals('', $importTransaction->note);+ try {+ $importTransaction->addColumnValue($one);+ $importTransaction->addColumnValue($two);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }+ $this->assertEquals('A B', $importTransaction->note);+ }++ /**+ * Test tags with a comma separator+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testTagsComma(): void+ {+ $one = new ColumnValue;+ $one->setRole('tags-comma');+ $one->setValue('a,b,c');++ $two = new ColumnValue;+ $two->setRole('tags-comma');+ $two->setValue('d,e,c');++ $importTransaction = new ImportTransaction;+ $this->assertCount(0, $importTransaction->tags);+ try {+ $importTransaction->addColumnValue($one);+ $importTransaction->addColumnValue($two);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }+ $this->assertCount(5, $importTransaction->tags);+ $this->assertEquals('a', $importTransaction->tags[0]);+ }++ /**+ * Test tags with a space separator+ *+ * @covers \FireflyIII\Support\Import\Placeholder\ImportTransaction+ */+ public function testTagsSpace(): void+ {+ $one = new ColumnValue;+ $one->setRole('tags-space');+ $one->setValue('a b c');++ $two = new ColumnValue;+ $two->setRole('tags-space');+ $two->setValue('d e c');++ $importTransaction = new ImportTransaction;+ $this->assertCount(0, $importTransaction->tags);+ try {+ $importTransaction->addColumnValue($one);+ $importTransaction->addColumnValue($two);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }+ $this->assertCount(5, $importTransaction->tags);+ $this->assertEquals('a', $importTransaction->tags[0]);+ }++}\ No newline at end of filediff --git a/tests/Unit/Support/Import/Routine/File/ImportableCreatorTest.php b/tests/Unit/Support/Import/Routine/File/ImportableCreatorTest.phpnew file mode 100644index 0000000000..3db3f1ccc6--- /dev/null+++ b/tests/Unit/Support/Import/Routine/File/ImportableCreatorTest.php@@ -0,0 +1,64 @@+<?php+/**+ * ImportableCreatorTest.php+ * Copyright (c) 2018 [email protected]+ *+ * This file is part of Firefly III.+ *+ * Firefly III is free software: you can redistribute it and/or modify+ * it under the terms of the GNU General Public License as published by+ * the Free Software Foundation, either version 3 of the License, or+ * (at your option) any later version.+ *+ * Firefly III 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 General Public License for more details.+ *+ * You should have received a copy of the GNU General Public License+ * along with Firefly III. If not, see <http://www.gnu.org/licenses/>.+ */++declare(strict_types=1);++namespace Tests\Unit\Support\Import\Routine\File;+++use FireflyIII\Support\Import\Placeholder\ColumnValue;+use FireflyIII\Support\Import\Placeholder\ImportTransaction;+use FireflyIII\Support\Import\Routine\File\ImportableCreator;+use Tests\TestCase;++/**+ * Class ImportableCreatorTest+ */+class ImportableCreatorTest extends TestCase+{+ /**+ * @covers \FireflyIII\Support\Import\Routine\File\ImportableCreator+ */+ public function testConvertSets(): void+ {+ $columnValue =new ColumnValue();+ $columnValue->setOriginalRole('account-name');+ $columnValue->setRole('account-id');+ $columnValue->setValue('Checking Account');+ $columnValue->setMappedValue(1);++ $input = [+ [+ $columnValue+ ]+ ];+++ $creator = new ImportableCreator;+ $result = $creator->convertSets($input);++ $this->assertCount(1, $result);+ $this->assertInstanceOf(ImportTransaction::class, $result[0]);+ $this->assertEquals(1, $result[0]->accountId);++ }++}\ No newline at end of filediff --git a/tests/Unit/Support/Import/Routine/File/LineReaderTest.php b/tests/Unit/Support/Import/Routine/File/LineReaderTest.phpnew file mode 100644index 0000000000..aa7c318d6a--- /dev/null+++ b/tests/Unit/Support/Import/Routine/File/LineReaderTest.php@@ -0,0 +1,102 @@+<?php+/**+ * LineReaderTest.php+ * Copyright (c) 2018 [email protected]+ *+ * This file is part of Firefly III.+ *+ * Firefly III is free software: you can redistribute it and/or modify+ * it under the terms of the GNU General Public License as published by+ * the Free Software Foundation, either version 3 of the License, or+ * (at your option) any later version.+ *+ * Firefly III 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 General Public License for more details.+ *+ * You should have received a copy of the GNU General Public License+ * along with Firefly III. If not, see <http://www.gnu.org/licenses/>.+ */++declare(strict_types=1);++namespace Tests\Unit\Support\Import\Routine\File;++use FireflyIII\Exceptions\FireflyException;+use FireflyIII\Helpers\Attachments\AttachmentHelperInterface;+use FireflyIII\Import\Specifics\IngDescription;+use FireflyIII\Models\Attachment;+use FireflyIII\Models\ImportJob;+use FireflyIII\Repositories\ImportJob\ImportJobRepositoryInterface;+use FireflyIII\Support\Import\Routine\File\LineReader;+use Illuminate\Support\Collection;+use Tests\TestCase;++/**+ * Class LineReaderTest+ */+class LineReaderTest extends TestCase+{+ /**+ * @covers \FireflyIII\Support\Import\Routine\File\LineReader+ */+ public function testGetLines(): void+ {+ $job = new ImportJob;+ $job->user_id = $this->user()->id;+ $job->key = 'linerA' . random_int(1, 1000);+ $job->status = 'new';+ $job->stage = 'new';+ $job->provider = 'fake';+ $job->file_type = '';+ $job->configuration = [+ 'specifics' => [+ 'IngDescription' => 1,+ 'BadSpecific' => 1,+ ],+ 'has-headers' => true,+ 'delimiter' => ',',+ ];+ $job->save();++ $att = new Attachment;+ $att->filename = 'import_file';+ $att->user_id = $this->user()->id;+ $att->attachable_id = $job->id;+ $att->attachable_type = Attachment::class;+ $att->md5 = md5('hello');+ $att->mime = 'fake';+ $att->size = 3;+ $att->save();++ // mock repositories:+ $repository = $this->mock(ImportJobRepositoryInterface::class);+ $attachments = $this->mock(AttachmentHelperInterface::class);+ $specific = $this->mock(IngDescription::class);++ // fake file content:+ $content = "header1,header2,header3\ncolumn1,column2,column3\nA,B,C";+ $specifics = [['column1', 'column2', 'column3'], ['A', 'B', 'C']];++ // mock calls and returns:+ $repository->shouldReceive('setUser')->once();+ $repository->shouldReceive('getAttachments')->once()->andReturn(new Collection([$att]));+ $attachments->shouldReceive('getAttachmentContent')->andReturn($content)->once();+ $repository->shouldReceive('getConfiguration')->once()->andReturn($job->configuration);++ // expect the rows to be run throught the specific.+ $specific->shouldReceive('run')->withArgs([$specifics[0]])->andReturn($specifics[0])->once();+ $specific->shouldReceive('run')->withArgs([$specifics[1]])->andReturn($specifics[1])->once();++ $lineReader = new LineReader;+ $lineReader->setImportJob($job);+ try {+ $lines = $lineReader->getLines();+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }+ $this->assertEquals($specifics, $lines);+ }++}\ No newline at end of filediff --git a/tests/Unit/Support/Import/Routine/File/MappingConvergerTest.php b/tests/Unit/Support/Import/Routine/File/MappingConvergerTest.phpnew file mode 100644index 0000000000..256ff75c85--- /dev/null+++ b/tests/Unit/Support/Import/Routine/File/MappingConvergerTest.php@@ -0,0 +1,154 @@+<?php+/**+ * MappingConvergerTest.php+ * Copyright (c) 2018 [email protected]+ *+ * This file is part of Firefly III.+ *+ * Firefly III is free software: you can redistribute it and/or modify+ * it under the terms of the GNU General Public License as published by+ * the Free Software Foundation, either version 3 of the License, or+ * (at your option) any later version.+ *+ * Firefly III 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 General Public License for more details.+ *+ * You should have received a copy of the GNU General Public License+ * along with Firefly III. If not, see <http://www.gnu.org/licenses/>.+ */++declare(strict_types=1);++namespace Tests\Unit\Support\Import\Routine\File;+++use FireflyIII\Exceptions\FireflyException;+use FireflyIII\Models\ImportJob;+use FireflyIII\Support\Import\Routine\File\MappingConverger;+use Tests\TestCase;++/**+ * Class MappingConvergerTest+ */+class MappingConvergerTest extends TestCase+{+ /**+ * @covers \FireflyIII\Support\Import\Routine\File\MappingConverger+ */+ public function testConverge(): void+ {++ // configuration+ $config = [+ 'column-roles' => [+ 0 => 'account-name',+ 1 => 'bill-name',+ 2 => 'budget-name',+ 3 => 'currency-code',+ 4 => 'category-name',+ 5 => 'foreign-currency-code',+ 6 => 'opposing-number',+ 7 => 'description',+ 8 => 'opposing-iban',+ ],+ 'column-mapping-config' => [+ 0 => [+ 'Checking Account' => 1,+ ],+ 1 => [+ 'BillX' => 2,+ ],+ 2 => [+ 'BudgetX' => 2,+ ],+ 3 => [+ 'EUR' => 7,+ ],+ 4 => [+ 'CategoryX' => 2,+ ],+ 5 => [+ 'USD' => 4,+ ],+ 6 => [+ 'SomeNumber' => 3,+ ],+ 8 => [+ 'IBANX' => 2,+ ],+ ],+ 'column-do-mapping' => [+ 0 => true,+ 1 => true,+ 2 => true,+ 3 => true,+ 4 => true,+ 5 => true,+ 6 => true,+ 7 => false,+ 8 => false,+ ],+ ];++ // just one line to process (should hit everything).+ $lines = [+ [+ 0 => 'Checking Account',+ 1 => 'BillX',+ 2 => 'BudgetX',+ 3 => 'EUR',+ 4 => 'CategoryX',+ 5 => 'USD',+ 6 => 'SomeNumber',+ 7 => 'I am a description',+ 8 => 'IBANX'+ ],+ [+ 0 => 'CheckingX Account',+ 1 => 'BillXA',+ 2 => 'BudgetBX',+ 3 => 'EUD',+ 4 => 'CategoryX',+ 5 => 'USA',+ 6 => 'SomeANumber',+ 7 => 'I am X description',+ 8 => 'IBANXX'+ ],+ ];++ $job = new ImportJob;+ $job->user_id = $this->user()->id;+ $job->key = 'linerA' . random_int(1, 1000);+ $job->status = 'new';+ $job->stage = 'new';+ $job->provider = 'fake';+ $job->file_type = '';+ $job->configuration = $config;+ $job->save();+++ $converger = new MappingConverger;+ $converger->setImportJob($job);+ try {+ $result = $converger->converge($lines);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }+ // do some comparing, we know what to expect.++ // line 0, column 0 is the account name.+ $this->assertEquals($lines[0][0], $result[0][0]->getValue());+ $this->assertEquals($config['column-roles'][0], $result[0][0]->getOriginalRole());+ $this->assertEquals('account-id', $result[0][0]->getRole()); // role changed due to mapping.+ $this->assertEquals(1, $result[0][0]->getMappedValue()); // can see which value it was given.++ // line 1, column 0 is the account name, but it could not be mapped.+ $this->assertEquals($lines[1][0], $result[1][0]->getValue());+ $this->assertEquals($config['column-roles'][0], $result[1][0]->getOriginalRole());+ $this->assertEquals($config['column-roles'][0], $result[1][0]->getRole()); // role did not change, no mapping.+ $this->assertEquals(0, $result[1][0]->getMappedValue()); // value of mapping is 0.+ }++}\ No newline at end of filediff --git a/tests/Unit/TransactionRules/Actions/AddTagTest.php b/tests/Unit/TransactionRules/Actions/AddTagTest.phpindex 3104d86475..4923559e51 100644--- a/tests/Unit/TransactionRules/Actions/AddTagTest.php+++ b/tests/Unit/TransactionRules/Actions/AddTagTest.php@@ -37,7 +37,7 @@ class AddTagTest extends TestCase* @covers \FireflyIII\TransactionRules\Actions\AddTag::__construct* @covers \FireflyIII\TransactionRules\Actions\AddTag::act()*/- public function testActExistingTag()+ public function testActExistingTag(): void{$tag = Tag::inRandomOrder()->whereNull('deleted_at')->first();$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();@@ -55,7 +55,7 @@ class AddTagTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Actions\AddTag::act()*/- public function testActNoTag()+ public function testActNoTag(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$ruleAction = new RuleAction;diff --git a/tests/Unit/TransactionRules/Actions/AppendDescriptionTest.php b/tests/Unit/TransactionRules/Actions/AppendDescriptionTest.phpindex 2c99c3df51..3e338eddc4 100644--- a/tests/Unit/TransactionRules/Actions/AppendDescriptionTest.php+++ b/tests/Unit/TransactionRules/Actions/AppendDescriptionTest.php@@ -36,7 +36,7 @@ class AppendDescriptionTest extends TestCase* @covers \FireflyIII\TransactionRules\Actions\AppendDescription::__construct* @covers \FireflyIII\TransactionRules\Actions\AppendDescription::act()*/- public function testActExistingTag()+ public function testActExistingTag(): void{$ruleAction = new RuleAction;$ruleAction->action_value = 'APPEND';diff --git a/tests/Unit/TransactionRules/Actions/AppendNotesTest.php b/tests/Unit/TransactionRules/Actions/AppendNotesTest.phpindex f796ebe2ca..c4200d77fe 100644--- a/tests/Unit/TransactionRules/Actions/AppendNotesTest.php+++ b/tests/Unit/TransactionRules/Actions/AppendNotesTest.php@@ -37,7 +37,7 @@ class AppendNotesTest extends TestCase* @covers \FireflyIII\TransactionRules\Actions\AppendNotes::__construct()* @covers \FireflyIII\TransactionRules\Actions\AppendNotes::act()*/- public function testAct()+ public function testAct(): void{// give journal some notes.$journal = TransactionJournal::find(3);@@ -66,7 +66,7 @@ class AppendNotesTest extends TestCase* @covers \FireflyIII\TransactionRules\Actions\AppendNotes::__construct()* @covers \FireflyIII\TransactionRules\Actions\AppendNotes::act()*/- public function testActNewNote()+ public function testActNewNote(): void{// give journal some notes.$journal = TransactionJournal::find(4);diff --git a/tests/Unit/TransactionRules/Actions/ClearBudgetTest.php b/tests/Unit/TransactionRules/Actions/ClearBudgetTest.phpindex b597ae3992..97f6e456e8 100644--- a/tests/Unit/TransactionRules/Actions/ClearBudgetTest.php+++ b/tests/Unit/TransactionRules/Actions/ClearBudgetTest.php@@ -37,7 +37,7 @@ class ClearBudgetTest extends TestCase* @covers \FireflyIII\TransactionRules\Actions\ClearBudget::__construct()* @covers \FireflyIII\TransactionRules\Actions\ClearBudget::act()*/- public function testAct()+ public function testAct(): void{// associate budget with journal:$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();diff --git a/tests/Unit/TransactionRules/Actions/ClearCategoryTest.php b/tests/Unit/TransactionRules/Actions/ClearCategoryTest.phpindex fa96275bde..e9b43a7d6d 100644--- a/tests/Unit/TransactionRules/Actions/ClearCategoryTest.php+++ b/tests/Unit/TransactionRules/Actions/ClearCategoryTest.php@@ -37,7 +37,7 @@ class ClearCategoryTest extends TestCase* @covers \FireflyIII\TransactionRules\Actions\ClearCategory::__construct()* @covers \FireflyIII\TransactionRules\Actions\ClearCategory::act()*/- public function testAct()+ public function testAct(): void{// associate budget with journal:$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();diff --git a/tests/Unit/TransactionRules/Actions/ClearNotesTest.php b/tests/Unit/TransactionRules/Actions/ClearNotesTest.phpindex 4a4a53f229..d4231b541a 100644--- a/tests/Unit/TransactionRules/Actions/ClearNotesTest.php+++ b/tests/Unit/TransactionRules/Actions/ClearNotesTest.php@@ -22,6 +22,7 @@ declare(strict_types=1);namespace Tests\Unit\TransactionRules\Actions;+use Exception;use FireflyIII\Models\Note;use FireflyIII\Models\RuleAction;use FireflyIII\Models\TransactionJournal;@@ -37,7 +38,7 @@ class ClearNotesTest extends TestCase* @covers \FireflyIII\TransactionRules\Actions\ClearNotes::__construct()* @covers \FireflyIII\TransactionRules\Actions\ClearNotes::act()*/- public function testAct()+ public function testAct(): void{// give journal a note:$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();@@ -54,7 +55,11 @@ class ClearNotesTest extends TestCase$ruleAction = new RuleAction;$ruleAction->action_value = null;$action = new ClearNotes($ruleAction);- $result = $action->act($journal);+ try {+ $result = $action->act($journal);+ } catch (Exception $e) {+ $this->assertTrue(false, $e->getMessage());+ }$this->assertTrue($result);// assert resultdiff --git a/tests/Unit/TransactionRules/Actions/PrependDescriptionTest.php b/tests/Unit/TransactionRules/Actions/PrependDescriptionTest.phpindex a01343cba9..118873e738 100644--- a/tests/Unit/TransactionRules/Actions/PrependDescriptionTest.php+++ b/tests/Unit/TransactionRules/Actions/PrependDescriptionTest.php@@ -36,7 +36,7 @@ class PrependDescriptionTest extends TestCase* @covers \FireflyIII\TransactionRules\Actions\PrependDescription::__construct()* @covers \FireflyIII\TransactionRules\Actions\PrependDescription::act()*/- public function testAct()+ public function testAct(): void{// get journal, give fixed description$description = 'text' . random_int(1, 1000);diff --git a/tests/Unit/TransactionRules/Actions/PrependNotesTest.php b/tests/Unit/TransactionRules/Actions/PrependNotesTest.phpindex cd08f9f60b..e67bebf15b 100644--- a/tests/Unit/TransactionRules/Actions/PrependNotesTest.php+++ b/tests/Unit/TransactionRules/Actions/PrependNotesTest.php@@ -37,7 +37,7 @@ class PrependNotesTest extends TestCase* @covers \FireflyIII\TransactionRules\Actions\PrependNotes::__construct()* @covers \FireflyIII\TransactionRules\Actions\PrependNotes::act()*/- public function testAct()+ public function testAct(): void{// give journal some notes.$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();@@ -66,7 +66,7 @@ class PrependNotesTest extends TestCase* @covers \FireflyIII\TransactionRules\Actions\PrependNotes::__construct()* @covers \FireflyIII\TransactionRules\Actions\PrependNotes::act()*/- public function testActNewNote()+ public function testActNewNote(): void{// give journal some notes.$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();diff --git a/tests/Unit/TransactionRules/Actions/RemoveAllTagsTest.php b/tests/Unit/TransactionRules/Actions/RemoveAllTagsTest.phpindex fa0b305f99..cb0960d8f7 100644--- a/tests/Unit/TransactionRules/Actions/RemoveAllTagsTest.php+++ b/tests/Unit/TransactionRules/Actions/RemoveAllTagsTest.php@@ -37,7 +37,7 @@ class RemoveAllTagsTest extends TestCase* @covers \FireflyIII\TransactionRules\Actions\RemoveAllTags::__construct()* @covers \FireflyIII\TransactionRules\Actions\RemoveAllTags::act()*/- public function testAct()+ public function testAct(): void{// find journal with at least one tag$journalIds = DB::table('tag_transaction_journal')->get(['transaction_journal_id'])->pluck('transaction_journal_id')->toArray();diff --git a/tests/Unit/TransactionRules/Actions/RemoveTagTest.php b/tests/Unit/TransactionRules/Actions/RemoveTagTest.phpindex 637f1ebbe0..aed4d3dce9 100644--- a/tests/Unit/TransactionRules/Actions/RemoveTagTest.php+++ b/tests/Unit/TransactionRules/Actions/RemoveTagTest.php@@ -37,7 +37,7 @@ class RemoveTagTest extends TestCase* @covers \FireflyIII\TransactionRules\Actions\RemoveTag::__construct()* @covers \FireflyIII\TransactionRules\Actions\RemoveTag::act()*/- public function testAct()+ public function testAct(): void{// find journal with at least one tag@@ -64,7 +64,7 @@ class RemoveTagTest extends TestCase* @covers \FireflyIII\TransactionRules\Actions\RemoveTag::__construct()* @covers \FireflyIII\TransactionRules\Actions\RemoveTag::act()*/- public function testActNoTag()+ public function testActNoTag(): void{// get journal, link al tags:/** @var TransactionJournal $journal */diff --git a/tests/Unit/TransactionRules/Actions/SetBudgetTest.php b/tests/Unit/TransactionRules/Actions/SetBudgetTest.phpindex 1e087f571e..3a4c6a2ab7 100644--- a/tests/Unit/TransactionRules/Actions/SetBudgetTest.php+++ b/tests/Unit/TransactionRules/Actions/SetBudgetTest.php@@ -39,7 +39,7 @@ class SetBudgetTest extends TestCase* @covers \FireflyIII\TransactionRules\Actions\SetBudget::__construct()* @covers \FireflyIII\TransactionRules\Actions\SetBudget::act()*/- public function testAct()+ public function testAct(): void{// get journal, remove all budgets$journal = TransactionJournal::inRandomOrder()->where('transaction_type_id', 1)->whereNull('deleted_at')->first();diff --git a/tests/Unit/TransactionRules/Actions/SetCategoryTest.php b/tests/Unit/TransactionRules/Actions/SetCategoryTest.phpindex c49f74df33..b8c9f9c720 100644--- a/tests/Unit/TransactionRules/Actions/SetCategoryTest.php+++ b/tests/Unit/TransactionRules/Actions/SetCategoryTest.php@@ -37,7 +37,7 @@ class SetCategoryTest extends TestCase* @covers \FireflyIII\TransactionRules\Actions\SetCategory::__construct()* @covers \FireflyIII\TransactionRules\Actions\SetCategory::act()*/- public function testAct()+ public function testAct(): void{// get journal, remove all budgets$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();diff --git a/tests/Unit/TransactionRules/Actions/SetDescriptionTest.php b/tests/Unit/TransactionRules/Actions/SetDescriptionTest.phpindex d6320379b4..fc6691c67d 100644--- a/tests/Unit/TransactionRules/Actions/SetDescriptionTest.php+++ b/tests/Unit/TransactionRules/Actions/SetDescriptionTest.php@@ -36,7 +36,7 @@ class SetDescriptionTest extends TestCase* @covers \FireflyIII\TransactionRules\Actions\SetDescription::__construct()* @covers \FireflyIII\TransactionRules\Actions\SetDescription::act()*/- public function testAct()+ public function testAct(): void{// get journal, give fixed description$description = 'text' . random_int(1, 1000);diff --git a/tests/Unit/TransactionRules/Actions/SetDestinationAccountTest.php b/tests/Unit/TransactionRules/Actions/SetDestinationAccountTest.phpindex 7e8d397689..0cd9b5594e 100644--- a/tests/Unit/TransactionRules/Actions/SetDestinationAccountTest.php+++ b/tests/Unit/TransactionRules/Actions/SetDestinationAccountTest.php@@ -44,7 +44,7 @@ class SetDestinationAccountTest extends TestCase** @covers \FireflyIII\TransactionRules\Actions\SetDestinationAccount*/- public function testActDepositExisting()+ public function testActDepositExisting(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$type = TransactionType::whereType(TransactionType::DEPOSIT)->first();@@ -86,7 +86,7 @@ class SetDestinationAccountTest extends TestCase** @covers \FireflyIII\TransactionRules\Actions\SetDestinationAccount*/- public function testActDepositNotExisting()+ public function testActDepositNotExisting(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$type = TransactionType::whereType(TransactionType::DEPOSIT)->first();@@ -114,7 +114,7 @@ class SetDestinationAccountTest extends TestCase** @covers \FireflyIII\TransactionRules\Actions\SetDestinationAccount*/- public function testActWithDrawalNotExisting()+ public function testActWithDrawalNotExisting(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$type = TransactionType::whereType(TransactionType::WITHDRAWAL)->first();@@ -146,7 +146,7 @@ class SetDestinationAccountTest extends TestCase** @covers \FireflyIII\TransactionRules\Actions\SetDestinationAccount*/- public function testActWithdrawalExisting()+ public function testActWithdrawalExisting(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$type = TransactionType::whereType(TransactionType::WITHDRAWAL)->first();@@ -189,7 +189,7 @@ class SetDestinationAccountTest extends TestCase** @covers \FireflyIII\TransactionRules\Actions\SetDestinationAccount*/- public function testSplitJournal()+ public function testSplitJournal(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$transaction = Transaction::orderBy('count', 'DESC')->groupBy('transaction_journal_id')diff --git a/tests/Unit/TransactionRules/Actions/SetNotesTest.php b/tests/Unit/TransactionRules/Actions/SetNotesTest.phpindex ad6ec7400a..d7f58138e5 100644--- a/tests/Unit/TransactionRules/Actions/SetNotesTest.php+++ b/tests/Unit/TransactionRules/Actions/SetNotesTest.php@@ -37,7 +37,7 @@ class SetNotesTest extends TestCase* @covers \FireflyIII\TransactionRules\Actions\SetNotes::__construct()* @covers \FireflyIII\TransactionRules\Actions\SetNotes::act()*/- public function testAct()+ public function testAct(): void{// give journal a note:$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();@@ -66,7 +66,7 @@ class SetNotesTest extends TestCase* @covers \FireflyIII\TransactionRules\Actions\SetNotes::__construct()* @covers \FireflyIII\TransactionRules\Actions\SetNotes::act()*/- public function testActNoNotes()+ public function testActNoNotes(): void{// give journal a note:$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();diff --git a/tests/Unit/TransactionRules/Actions/SetSourceAccountTest.php b/tests/Unit/TransactionRules/Actions/SetSourceAccountTest.phpindex b31de17f98..4e5fbf69d5 100644--- a/tests/Unit/TransactionRules/Actions/SetSourceAccountTest.php+++ b/tests/Unit/TransactionRules/Actions/SetSourceAccountTest.php@@ -42,7 +42,7 @@ class SetSourceAccountTest extends TestCase** @covers \FireflyIII\TransactionRules\Actions\SetSourceAccount*/- public function testActDepositExistingUpdated()+ public function testActDepositExistingUpdated(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);@@ -86,7 +86,7 @@ class SetSourceAccountTest extends TestCase** @covers \FireflyIII\TransactionRules\Actions\SetSourceAccount*/- public function testActDepositRevenue()+ public function testActDepositRevenue(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$type = TransactionType::whereType(TransactionType::DEPOSIT)->first();@@ -115,7 +115,7 @@ class SetSourceAccountTest extends TestCase** @covers \FireflyIII\TransactionRules\Actions\SetSourceAccount*/- public function testActWithdrawalExistingUpdated()+ public function testActWithdrawalExistingUpdated(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$type = TransactionType::whereType(TransactionType::WITHDRAWAL)->first();@@ -157,7 +157,7 @@ class SetSourceAccountTest extends TestCase** @covers \FireflyIII\TransactionRules\Actions\SetSourceAccount*/- public function testActWithdrawalNotExisting()+ public function testActWithdrawalNotExisting(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$type = TransactionType::whereType(TransactionType::WITHDRAWAL)->first();@@ -184,7 +184,7 @@ class SetSourceAccountTest extends TestCase** @covers \FireflyIII\TransactionRules\Actions\SetSourceAccount*/- public function testSplitJournal()+ public function testSplitJournal(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$transaction = Transaction::orderBy('count', 'DESC')->groupBy('transaction_journal_id')diff --git a/tests/Unit/TransactionRules/Triggers/AmountExactlyTest.php b/tests/Unit/TransactionRules/Triggers/AmountExactlyTest.phpindex db6bde769c..df24de6658 100644--- a/tests/Unit/TransactionRules/Triggers/AmountExactlyTest.php+++ b/tests/Unit/TransactionRules/Triggers/AmountExactlyTest.php@@ -35,7 +35,7 @@ class AmountExactlyTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\AmountExactly::triggered*/- public function testTriggeredExact()+ public function testTriggeredExact(): void{$journalRepos = $this->mock(JournalRepositoryInterface::class);$journalRepos->shouldReceive('setUser');@@ -51,7 +51,7 @@ class AmountExactlyTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\AmountExactly::triggered*/- public function testTriggeredNotExact()+ public function testTriggeredNotExact(): void{$journalRepos = $this->mock(JournalRepositoryInterface::class);$journalRepos->shouldReceive('setUser');@@ -67,7 +67,7 @@ class AmountExactlyTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\AmountExactly::willMatchEverything*/- public function testWillMatchEverythingNotNull()+ public function testWillMatchEverythingNotNull(): void{$value = 'x';$result = AmountExactly::willMatchEverything($value);@@ -77,7 +77,7 @@ class AmountExactlyTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\AmountExactly::willMatchEverything*/- public function testWillMatchEverythingNull()+ public function testWillMatchEverythingNull(): void{$value = null;$result = AmountExactly::willMatchEverything($value);diff --git a/tests/Unit/TransactionRules/Triggers/AmountLessTest.php b/tests/Unit/TransactionRules/Triggers/AmountLessTest.phpindex b345e897e5..afdfbf23d7 100644--- a/tests/Unit/TransactionRules/Triggers/AmountLessTest.php+++ b/tests/Unit/TransactionRules/Triggers/AmountLessTest.php@@ -35,7 +35,7 @@ class AmountLessTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\AmountLess::triggered*/- public function testTriggeredExact()+ public function testTriggeredExact(): void{$journalRepos = $this->mock(JournalRepositoryInterface::class);$journalRepos->shouldReceive('setUser');@@ -52,7 +52,7 @@ class AmountLessTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\AmountLess::triggered*/- public function testTriggeredLess()+ public function testTriggeredLess(): void{$journalRepos = $this->mock(JournalRepositoryInterface::class);$journalRepos->shouldReceive('setUser');@@ -69,7 +69,7 @@ class AmountLessTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\AmountLess::triggered*/- public function testTriggeredNotLess()+ public function testTriggeredNotLess(): void{$journalRepos = $this->mock(JournalRepositoryInterface::class);$journalRepos->shouldReceive('setUser');@@ -86,7 +86,7 @@ class AmountLessTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\AmountLess::willMatchEverything*/- public function testWillMatchEverythingNotNull()+ public function testWillMatchEverythingNotNull(): void{$value = 'x';$result = AmountLess::willMatchEverything($value);@@ -96,7 +96,7 @@ class AmountLessTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\AmountLess::willMatchEverything*/- public function testWillMatchEverythingNull()+ public function testWillMatchEverythingNull(): void{$value = null;$result = AmountLess::willMatchEverything($value);diff --git a/tests/Unit/TransactionRules/Triggers/AmountMoreTest.php b/tests/Unit/TransactionRules/Triggers/AmountMoreTest.phpindex 9459037d45..5e71d43bee 100644--- a/tests/Unit/TransactionRules/Triggers/AmountMoreTest.php+++ b/tests/Unit/TransactionRules/Triggers/AmountMoreTest.php@@ -35,7 +35,7 @@ class AmountMoreTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\AmountMore::triggered*/- public function testTriggeredExact()+ public function testTriggeredExact(): void{$journalRepos = $this->mock(JournalRepositoryInterface::class);$journalRepos->shouldReceive('setUser');@@ -52,7 +52,7 @@ class AmountMoreTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\AmountMore::triggered*/- public function testTriggeredMore()+ public function testTriggeredMore(): void{$journalRepos = $this->mock(JournalRepositoryInterface::class);$journalRepos->shouldReceive('setUser');@@ -69,7 +69,7 @@ class AmountMoreTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\AmountMore::triggered*/- public function testTriggeredNotMore()+ public function testTriggeredNotMore(): void{$journalRepos = $this->mock(JournalRepositoryInterface::class);$journalRepos->shouldReceive('setUser');@@ -86,7 +86,7 @@ class AmountMoreTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\AmountMore::willMatchEverything*/- public function testWillMatchEverythingNotNull()+ public function testWillMatchEverythingNotNull(): void{$value = '1';$result = AmountMore::willMatchEverything($value);@@ -96,7 +96,7 @@ class AmountMoreTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\AmountMore::willMatchEverything*/- public function testWillMatchEverythingNull()+ public function testWillMatchEverythingNull(): void{$value = null;$result = AmountMore::willMatchEverything($value);@@ -106,7 +106,7 @@ class AmountMoreTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\AmountMore::willMatchEverything*/- public function testWillMatchEverythingZero()+ public function testWillMatchEverythingZero(): void{$value = '0';$result = AmountMore::willMatchEverything($value);diff --git a/tests/Unit/TransactionRules/Triggers/BudgetIsTest.php b/tests/Unit/TransactionRules/Triggers/BudgetIsTest.phpindex 06af062137..871d608ada 100644--- a/tests/Unit/TransactionRules/Triggers/BudgetIsTest.php+++ b/tests/Unit/TransactionRules/Triggers/BudgetIsTest.php@@ -24,6 +24,7 @@ namespace Tests\Unit\TransactionRules\Triggers;use FireflyIII\Models\TransactionJournal;use FireflyIII\TransactionRules\Triggers\BudgetIs;+use Illuminate\Support\Collection;use Tests\TestCase;/**@@ -34,7 +35,7 @@ class BudgetIsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\BudgetIs::triggered*/- public function testTriggeredJournal()+ public function testTriggeredJournal(): void{do {$journal = TransactionJournal::inRandomOrder()->where('transaction_type_id', 1)->whereNull('deleted_at')->first();@@ -54,7 +55,7 @@ class BudgetIsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\BudgetIs::triggered*/- public function testTriggeredNotJournal()+ public function testTriggeredNotJournal(): void{do {$journal = TransactionJournal::inRandomOrder()->where('transaction_type_id', 1)->whereNull('deleted_at')->first();@@ -75,13 +76,14 @@ class BudgetIsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\BudgetIs::triggered*/- public function testTriggeredTransaction()+ public function testTriggeredTransaction(): void{do {$journal = TransactionJournal::inRandomOrder()->where('transaction_type_id', 1)->whereNull('deleted_at')->first();$count = $journal->transactions()->count();} while ($count !== 2);+ /** @var Collection $transactions */$transactions = $journal->transactions()->get();$budget = $journal->user->budgets()->first();@@ -101,7 +103,7 @@ class BudgetIsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\BudgetIs::willMatchEverything*/- public function testWillMatchEverythingNotNull()+ public function testWillMatchEverythingNotNull(): void{$value = 'x';$result = BudgetIs::willMatchEverything($value);@@ -111,7 +113,7 @@ class BudgetIsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\BudgetIs::willMatchEverything*/- public function testWillMatchEverythingNull()+ public function testWillMatchEverythingNull(): void{$value = null;$result = BudgetIs::willMatchEverything($value);diff --git a/tests/Unit/TransactionRules/Triggers/CategoryIsTest.php b/tests/Unit/TransactionRules/Triggers/CategoryIsTest.phpindex 380cc1a6d3..2fda7c1e74 100644--- a/tests/Unit/TransactionRules/Triggers/CategoryIsTest.php+++ b/tests/Unit/TransactionRules/Triggers/CategoryIsTest.php@@ -34,7 +34,7 @@ class CategoryIsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\CategoryIs::triggered*/- public function testTriggeredJournal()+ public function testTriggeredJournal(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$category = $journal->user->categories()->first();@@ -50,7 +50,7 @@ class CategoryIsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\CategoryIs::triggered*/- public function testTriggeredNotJournal()+ public function testTriggeredNotJournal(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$category = $journal->user->categories()->first();@@ -67,7 +67,7 @@ class CategoryIsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\CategoryIs::triggered*/- public function testTriggeredTransaction()+ public function testTriggeredTransaction(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$transaction = $journal->transactions()->first();@@ -87,7 +87,7 @@ class CategoryIsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\CategoryIs::willMatchEverything*/- public function testWillMatchEverythingNotNull()+ public function testWillMatchEverythingNotNull(): void{$value = 'x';$result = CategoryIs::willMatchEverything($value);@@ -97,7 +97,7 @@ class CategoryIsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\CategoryIs::willMatchEverything*/- public function testWillMatchEverythingNull()+ public function testWillMatchEverythingNull(): void{$value = null;$result = CategoryIs::willMatchEverything($value);diff --git a/tests/Unit/TransactionRules/Triggers/DescriptionContainsTest.php b/tests/Unit/TransactionRules/Triggers/DescriptionContainsTest.phpindex a05eb9246d..193d3521c0 100644--- a/tests/Unit/TransactionRules/Triggers/DescriptionContainsTest.php+++ b/tests/Unit/TransactionRules/Triggers/DescriptionContainsTest.php@@ -34,7 +34,7 @@ class DescriptionContainsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\DescriptionContains::triggered*/- public function testTriggeredCase()+ public function testTriggeredCase(): void{$journal = new TransactionJournal;$journal->description = 'Lorem IPSUM bla bla ';@@ -46,7 +46,7 @@ class DescriptionContainsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\DescriptionContains::triggered*/- public function testTriggeredDefault()+ public function testTriggeredDefault(): void{$journal = new TransactionJournal;$journal->description = 'Should contain test string';@@ -58,7 +58,7 @@ class DescriptionContainsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\DescriptionContains::triggered*/- public function testTriggeredEnd()+ public function testTriggeredEnd(): void{$journal = new TransactionJournal;$journal->description = 'Something is going to happen';@@ -70,7 +70,7 @@ class DescriptionContainsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\DescriptionContains::triggered*/- public function testTriggeredNot()+ public function testTriggeredNot(): void{$journal = new TransactionJournal;$journal->description = 'Lorem IPSUM bla bla ';@@ -82,7 +82,7 @@ class DescriptionContainsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\DescriptionContains::triggered*/- public function testTriggeredStart()+ public function testTriggeredStart(): void{$journal = new TransactionJournal;$journal->description = 'Something is going to happen';@@ -94,7 +94,7 @@ class DescriptionContainsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\DescriptionContains::willMatchEverything*/- public function testWillMatchEverythingEmpty()+ public function testWillMatchEverythingEmpty(): void{$value = '';$result = DescriptionContains::willMatchEverything($value);@@ -104,7 +104,7 @@ class DescriptionContainsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\DescriptionContains::willMatchEverything*/- public function testWillMatchEverythingNotNull()+ public function testWillMatchEverythingNotNull(): void{$value = 'x';$result = DescriptionContains::willMatchEverything($value);@@ -114,7 +114,7 @@ class DescriptionContainsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\DescriptionContains::willMatchEverything*/- public function testWillMatchEverythingNull()+ public function testWillMatchEverythingNull(): void{$value = null;$result = DescriptionContains::willMatchEverything($value);diff --git a/tests/Unit/TransactionRules/Triggers/DescriptionEndsTest.php b/tests/Unit/TransactionRules/Triggers/DescriptionEndsTest.phpindex 0b47ccb2bf..cce83e5e77 100644--- a/tests/Unit/TransactionRules/Triggers/DescriptionEndsTest.php+++ b/tests/Unit/TransactionRules/Triggers/DescriptionEndsTest.php@@ -34,7 +34,7 @@ class DescriptionEndsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\DescriptionEnds::triggered*/- public function testTriggeredCase()+ public function testTriggeredCase(): void{$journal = new TransactionJournal;$journal->description = 'Lorem IPSUMbla';@@ -46,7 +46,7 @@ class DescriptionEndsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\DescriptionEnds::triggered*/- public function testTriggeredClose()+ public function testTriggeredClose(): void{$journal = new TransactionJournal;$journal->description = 'Something is going to happen';@@ -58,7 +58,7 @@ class DescriptionEndsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\DescriptionEnds::triggered*/- public function testTriggeredDefault()+ public function testTriggeredDefault(): void{$journal = new TransactionJournal;$journal->description = 'Should contain test string';@@ -70,7 +70,7 @@ class DescriptionEndsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\DescriptionEnds::triggered*/- public function testTriggeredLongSearch()+ public function testTriggeredLongSearch(): void{$journal = new TransactionJournal;$journal->description = 'Something';@@ -82,7 +82,7 @@ class DescriptionEndsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\DescriptionEnds::triggered*/- public function testTriggeredLonger()+ public function testTriggeredLonger(): void{$journal = new TransactionJournal;$journal->description = 'Something is going to happen';@@ -94,7 +94,7 @@ class DescriptionEndsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\DescriptionEnds::triggered*/- public function testTriggeredNot()+ public function testTriggeredNot(): void{$journal = new TransactionJournal;$journal->description = 'Lorem IPSUM blabla';@@ -106,7 +106,7 @@ class DescriptionEndsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\DescriptionEnds::willMatchEverything*/- public function testWillMatchEverythingEmpty()+ public function testWillMatchEverythingEmpty(): void{$value = '';$result = DescriptionEnds::willMatchEverything($value);@@ -116,7 +116,7 @@ class DescriptionEndsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\DescriptionEnds::willMatchEverything*/- public function testWillMatchEverythingNotNull()+ public function testWillMatchEverythingNotNull(): void{$value = 'x';$result = DescriptionEnds::willMatchEverything($value);@@ -126,7 +126,7 @@ class DescriptionEndsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\DescriptionEnds::willMatchEverything*/- public function testWillMatchEverythingNull()+ public function testWillMatchEverythingNull(): void{$value = null;$result = DescriptionEnds::willMatchEverything($value);diff --git a/tests/Unit/TransactionRules/Triggers/DescriptionIsTest.php b/tests/Unit/TransactionRules/Triggers/DescriptionIsTest.phpindex 70a4d721a7..8047c1ee21 100644--- a/tests/Unit/TransactionRules/Triggers/DescriptionIsTest.php+++ b/tests/Unit/TransactionRules/Triggers/DescriptionIsTest.php@@ -34,7 +34,7 @@ class DescriptionIsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\DescriptionIs::triggered*/- public function testTriggeredCase()+ public function testTriggeredCase(): void{$journal = new TransactionJournal;$journal->description = 'Lorem IPSUMbla';@@ -46,7 +46,7 @@ class DescriptionIsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\DescriptionIs::triggered*/- public function testTriggeredClose()+ public function testTriggeredClose(): void{$journal = new TransactionJournal;$journal->description = 'Something is going to happen';@@ -58,7 +58,7 @@ class DescriptionIsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\DescriptionIs::triggered*/- public function testTriggeredDefault()+ public function testTriggeredDefault(): void{$journal = new TransactionJournal;$journal->description = 'Should be test string';@@ -70,7 +70,7 @@ class DescriptionIsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\DescriptionIs::triggered*/- public function testTriggeredNot()+ public function testTriggeredNot(): void{$journal = new TransactionJournal;$journal->description = 'Lorem IPSUM blabla';@@ -82,7 +82,7 @@ class DescriptionIsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\DescriptionIs::willMatchEverything*/- public function testWillMatchEverythingNotNull()+ public function testWillMatchEverythingNotNull(): void{$value = 'x';$result = DescriptionIs::willMatchEverything($value);@@ -92,7 +92,7 @@ class DescriptionIsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\DescriptionIs::willMatchEverything*/- public function testWillMatchEverythingNull()+ public function testWillMatchEverythingNull(): void{$value = null;$result = DescriptionIs::willMatchEverything($value);diff --git a/tests/Unit/TransactionRules/Triggers/DescriptionStartsTest.php b/tests/Unit/TransactionRules/Triggers/DescriptionStartsTest.phpindex 48b8002bfb..d676ae8ea4 100644--- a/tests/Unit/TransactionRules/Triggers/DescriptionStartsTest.php+++ b/tests/Unit/TransactionRules/Triggers/DescriptionStartsTest.php@@ -34,7 +34,7 @@ class DescriptionStartsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\DescriptionStarts::triggered*/- public function testTriggeredCase()+ public function testTriggeredCase(): void{$journal = new TransactionJournal;$journal->description = 'Lorem IPSUMbla';@@ -46,7 +46,7 @@ class DescriptionStartsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\DescriptionStarts::triggered*/- public function testTriggeredClose()+ public function testTriggeredClose(): void{$journal = new TransactionJournal;$journal->description = 'Something is going to happen';@@ -58,7 +58,7 @@ class DescriptionStartsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\DescriptionStarts::triggered*/- public function testTriggeredDefault()+ public function testTriggeredDefault(): void{$journal = new TransactionJournal;$journal->description = 'Should contain test string';@@ -70,7 +70,7 @@ class DescriptionStartsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\DescriptionStarts::triggered*/- public function testTriggeredLongSearch()+ public function testTriggeredLongSearch(): void{$journal = new TransactionJournal;$journal->description = 'Something';@@ -82,7 +82,7 @@ class DescriptionStartsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\DescriptionStarts::triggered*/- public function testTriggeredNot()+ public function testTriggeredNot(): void{$journal = new TransactionJournal;$journal->description = 'Lorem IPSUM blabla';@@ -94,7 +94,7 @@ class DescriptionStartsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\DescriptionStarts::willMatchEverything*/- public function testWillMatchEverythingEmpty()+ public function testWillMatchEverythingEmpty(): void{$value = '';$result = DescriptionStarts::willMatchEverything($value);@@ -104,7 +104,7 @@ class DescriptionStartsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\DescriptionStarts::willMatchEverything*/- public function testWillMatchEverythingNotNull()+ public function testWillMatchEverythingNotNull(): void{$value = 'x';$result = DescriptionStarts::willMatchEverything($value);@@ -114,7 +114,7 @@ class DescriptionStartsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\DescriptionStarts::willMatchEverything*/- public function testWillMatchEverythingNull()+ public function testWillMatchEverythingNull(): void{$value = null;$result = DescriptionStarts::willMatchEverything($value);diff --git a/tests/Unit/TransactionRules/Triggers/FromAccountContainsTest.php b/tests/Unit/TransactionRules/Triggers/FromAccountContainsTest.phpindex bff1abe830..39e17cd036 100644--- a/tests/Unit/TransactionRules/Triggers/FromAccountContainsTest.php+++ b/tests/Unit/TransactionRules/Triggers/FromAccountContainsTest.php@@ -34,7 +34,7 @@ class FromAccountContainsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\FromAccountContains::triggered*/- public function testTriggered()+ public function testTriggered(): void{$count = 0;while ($count === 0) {@@ -52,7 +52,7 @@ class FromAccountContainsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\FromAccountContains::triggered*/- public function testTriggeredNot()+ public function testTriggeredNot(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();@@ -64,7 +64,7 @@ class FromAccountContainsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\FromAccountContains::willMatchEverything*/- public function testWillMatchEverythingEmpty()+ public function testWillMatchEverythingEmpty(): void{$value = '';$result = FromAccountContains::willMatchEverything($value);@@ -74,7 +74,7 @@ class FromAccountContainsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\FromAccountContains::willMatchEverything*/- public function testWillMatchEverythingNotNull()+ public function testWillMatchEverythingNotNull(): void{$value = 'x';$result = FromAccountContains::willMatchEverything($value);@@ -84,7 +84,7 @@ class FromAccountContainsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\FromAccountContains::willMatchEverything*/- public function testWillMatchEverythingNull()+ public function testWillMatchEverythingNull(): void{$value = null;$result = FromAccountContains::willMatchEverything($value);diff --git a/tests/Unit/TransactionRules/Triggers/FromAccountEndsTest.php b/tests/Unit/TransactionRules/Triggers/FromAccountEndsTest.phpindex f158707b9f..0c362edd1f 100644--- a/tests/Unit/TransactionRules/Triggers/FromAccountEndsTest.php+++ b/tests/Unit/TransactionRules/Triggers/FromAccountEndsTest.php@@ -34,7 +34,7 @@ class FromAccountEndsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\FromAccountEnds::triggered*/- public function testTriggered()+ public function testTriggered(): void{$count = 0;while ($count === 0) {@@ -52,7 +52,7 @@ class FromAccountEndsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\FromAccountEnds::triggered*/- public function testTriggeredLonger()+ public function testTriggeredLonger(): void{$count = 0;while ($count === 0) {@@ -70,7 +70,7 @@ class FromAccountEndsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\FromAccountEnds::triggered*/- public function testTriggeredNot()+ public function testTriggeredNot(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();@@ -82,7 +82,7 @@ class FromAccountEndsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\FromAccountEnds::willMatchEverything*/- public function testWillMatchEverythingEmpty()+ public function testWillMatchEverythingEmpty(): void{$value = '';$result = FromAccountEnds::willMatchEverything($value);@@ -92,7 +92,7 @@ class FromAccountEndsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\FromAccountEnds::willMatchEverything*/- public function testWillMatchEverythingNotNull()+ public function testWillMatchEverythingNotNull(): void{$value = 'x';$result = FromAccountEnds::willMatchEverything($value);@@ -102,7 +102,7 @@ class FromAccountEndsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\FromAccountEnds::willMatchEverything*/- public function testWillMatchEverythingNull()+ public function testWillMatchEverythingNull(): void{$value = null;$result = FromAccountEnds::willMatchEverything($value);diff --git a/tests/Unit/TransactionRules/Triggers/FromAccountIsTest.php b/tests/Unit/TransactionRules/Triggers/FromAccountIsTest.phpindex d2a91b8b71..0ac584ec44 100644--- a/tests/Unit/TransactionRules/Triggers/FromAccountIsTest.php+++ b/tests/Unit/TransactionRules/Triggers/FromAccountIsTest.php@@ -34,7 +34,7 @@ class FromAccountIsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\FromAccountIs::triggered*/- public function testTriggered()+ public function testTriggered(): void{$count = 0;while ($count === 0) {@@ -52,7 +52,7 @@ class FromAccountIsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\FromAccountIs::triggered*/- public function testTriggeredNot()+ public function testTriggeredNot(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();@@ -64,7 +64,7 @@ class FromAccountIsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\FromAccountIs::willMatchEverything*/- public function testWillMatchEverythingEmpty()+ public function testWillMatchEverythingEmpty(): void{$value = '';$result = FromAccountIs::willMatchEverything($value);@@ -74,7 +74,7 @@ class FromAccountIsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\FromAccountIs::willMatchEverything*/- public function testWillMatchEverythingNotNull()+ public function testWillMatchEverythingNotNull(): void{$value = 'x';$result = FromAccountIs::willMatchEverything($value);@@ -84,7 +84,7 @@ class FromAccountIsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\FromAccountIs::willMatchEverything*/- public function testWillMatchEverythingNull()+ public function testWillMatchEverythingNull(): void{$value = null;$result = FromAccountIs::willMatchEverything($value);diff --git a/tests/Unit/TransactionRules/Triggers/FromAccountStartsTest.php b/tests/Unit/TransactionRules/Triggers/FromAccountStartsTest.phpindex 0d9742099e..e411beae7f 100644--- a/tests/Unit/TransactionRules/Triggers/FromAccountStartsTest.php+++ b/tests/Unit/TransactionRules/Triggers/FromAccountStartsTest.php@@ -34,7 +34,7 @@ class FromAccountStartsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\FromAccountStarts::triggered*/- public function testTriggered()+ public function testTriggered(): void{$transaction = null;do {@@ -51,7 +51,7 @@ class FromAccountStartsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\FromAccountStarts::triggered*/- public function testTriggeredLonger()+ public function testTriggeredLonger(): void{$transaction = null;do {@@ -69,7 +69,7 @@ class FromAccountStartsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\FromAccountStarts::triggered*/- public function testTriggeredNot()+ public function testTriggeredNot(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();@@ -81,7 +81,7 @@ class FromAccountStartsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\FromAccountStarts::willMatchEverything*/- public function testWillMatchEverythingEmpty()+ public function testWillMatchEverythingEmpty(): void{$value = '';$result = FromAccountStarts::willMatchEverything($value);@@ -91,7 +91,7 @@ class FromAccountStartsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\FromAccountStarts::willMatchEverything*/- public function testWillMatchEverythingNotNull()+ public function testWillMatchEverythingNotNull(): void{$value = 'x';$result = FromAccountStarts::willMatchEverything($value);@@ -101,7 +101,7 @@ class FromAccountStartsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\FromAccountStarts::willMatchEverything*/- public function testWillMatchEverythingNull()+ public function testWillMatchEverythingNull(): void{$value = null;$result = FromAccountStarts::willMatchEverything($value);diff --git a/tests/Unit/TransactionRules/Triggers/HasAnyBudgetTest.php b/tests/Unit/TransactionRules/Triggers/HasAnyBudgetTest.phpindex 6ad4a71235..a2c7664c40 100644--- a/tests/Unit/TransactionRules/Triggers/HasAnyBudgetTest.php+++ b/tests/Unit/TransactionRules/Triggers/HasAnyBudgetTest.php@@ -34,7 +34,7 @@ class HasAnyBudgetTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\HasAnyBudget::triggered*/- public function testTriggered()+ public function testTriggered(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$budget = $journal->user->budgets()->first();@@ -50,7 +50,7 @@ class HasAnyBudgetTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\HasAnyBudget::triggered*/- public function testTriggeredNot()+ public function testTriggeredNot(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$journal->budgets()->detach();@@ -63,7 +63,7 @@ class HasAnyBudgetTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\HasAnyBudget::triggered*/- public function testTriggeredTransactions()+ public function testTriggeredTransactions(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$budget = $journal->user->budgets()->first();@@ -86,7 +86,7 @@ class HasAnyBudgetTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\HasAnyBudget::willMatchEverything*/- public function testWillMatchEverything()+ public function testWillMatchEverything(): void{$value = '';$result = HasAnyBudget::willMatchEverything($value);diff --git a/tests/Unit/TransactionRules/Triggers/HasAnyTagTest.php b/tests/Unit/TransactionRules/Triggers/HasAnyTagTest.phpindex 1f0a928e88..366ef620ec 100644--- a/tests/Unit/TransactionRules/Triggers/HasAnyTagTest.php+++ b/tests/Unit/TransactionRules/Triggers/HasAnyTagTest.php@@ -34,7 +34,7 @@ class HasAnyTagTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\HasAnyTag::triggered*/- public function testTriggered()+ public function testTriggered(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$tag = $journal->user->tags()->first();@@ -50,7 +50,7 @@ class HasAnyTagTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\HasAnyTag::triggered*/- public function testTriggeredNot()+ public function testTriggeredNot(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$journal->tags()->detach();@@ -63,7 +63,7 @@ class HasAnyTagTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\HasAnyTag::willMatchEverything*/- public function testWillMatchEverything()+ public function testWillMatchEverything(): void{$value = '';$result = HasAnyTag::willMatchEverything($value);diff --git a/tests/Unit/TransactionRules/Triggers/HasAttachmentTest.php b/tests/Unit/TransactionRules/Triggers/HasAttachmentTest.phpindex 9b2a4316c9..841261bb6d 100644--- a/tests/Unit/TransactionRules/Triggers/HasAttachmentTest.php+++ b/tests/Unit/TransactionRules/Triggers/HasAttachmentTest.php@@ -34,7 +34,7 @@ class HasAttachmentTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\HasAttachment::triggered*/- public function testTriggered()+ public function testTriggered(): void{do {$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();@@ -53,7 +53,7 @@ class HasAttachmentTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\HasAttachment::triggered*/- public function testTriggeredFalse()+ public function testTriggeredFalse(): void{do {// this is kind of cheating but OK.@@ -71,7 +71,7 @@ class HasAttachmentTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\HasAttachment::willMatchEverything*/- public function testWillMatchEverything()+ public function testWillMatchEverything(): void{$value = '5';$result = HasAttachment::willMatchEverything($value);@@ -81,7 +81,7 @@ class HasAttachmentTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\HasAttachment::willMatchEverything*/- public function testWillMatchEverythingTrue()+ public function testWillMatchEverythingTrue(): void{$value = -1;$result = HasAttachment::willMatchEverything($value);diff --git a/tests/Unit/TransactionRules/Triggers/HasNoBudgetTest.php b/tests/Unit/TransactionRules/Triggers/HasNoBudgetTest.phpindex b0df151e08..f1eb119f9e 100644--- a/tests/Unit/TransactionRules/Triggers/HasNoBudgetTest.php+++ b/tests/Unit/TransactionRules/Triggers/HasNoBudgetTest.php@@ -35,7 +35,7 @@ class HasNoBudgetTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\HasNoBudget::triggered*/- public function testTriggeredBudget()+ public function testTriggeredBudget(): void{$journal = TransactionJournal::inRandomOrder()->where('transaction_type_id', 1)->whereNull('deleted_at')->first();$budget = $journal->user->budgets()->first();@@ -51,7 +51,7 @@ class HasNoBudgetTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\HasNoBudget::triggered*/- public function testTriggeredNoBudget()+ public function testTriggeredNoBudget(): void{/** @var TransactionJournal $journal */$journal = TransactionJournal::inRandomOrder()->where('transaction_type_id', 1)->whereNull('deleted_at')->first();@@ -70,7 +70,7 @@ class HasNoBudgetTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\HasNoBudget::triggered*/- public function testTriggeredTransaction()+ public function testTriggeredTransaction(): void{/** @var TransactionJournal $journal */$journal = TransactionJournal::inRandomOrder()->where('transaction_type_id', 1)->whereNull('deleted_at')->first();@@ -93,7 +93,7 @@ class HasNoBudgetTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\HasNoBudget::willMatchEverything*/- public function testWillMatchEverythingNull()+ public function testWillMatchEverythingNull(): void{$value = null;$result = HasNoBudget::willMatchEverything($value);diff --git a/tests/Unit/TransactionRules/Triggers/HasNoCategoryTest.php b/tests/Unit/TransactionRules/Triggers/HasNoCategoryTest.phpindex 8eae77fd89..74ed15ed63 100644--- a/tests/Unit/TransactionRules/Triggers/HasNoCategoryTest.php+++ b/tests/Unit/TransactionRules/Triggers/HasNoCategoryTest.php@@ -35,7 +35,7 @@ class HasNoCategoryTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\HasNoCategory::triggered*/- public function testTriggeredCategory()+ public function testTriggeredCategory(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$category = $journal->user->categories()->first();@@ -51,7 +51,7 @@ class HasNoCategoryTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\HasNoCategory::triggered*/- public function testTriggeredNoCategory()+ public function testTriggeredNoCategory(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$journal->categories()->detach();@@ -73,7 +73,7 @@ class HasNoCategoryTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\HasNoCategory::triggered*/- public function testTriggeredTransaction()+ public function testTriggeredTransaction(): void{$count = 0;while ($count === 0) {@@ -96,7 +96,7 @@ class HasNoCategoryTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\HasNoCategory::willMatchEverything*/- public function testWillMatchEverythingNull()+ public function testWillMatchEverythingNull(): void{$value = null;$result = HasNoCategory::willMatchEverything($value);diff --git a/tests/Unit/TransactionRules/Triggers/HasNoTagTest.php b/tests/Unit/TransactionRules/Triggers/HasNoTagTest.phpindex 027176dce7..a29108d8c4 100644--- a/tests/Unit/TransactionRules/Triggers/HasNoTagTest.php+++ b/tests/Unit/TransactionRules/Triggers/HasNoTagTest.php@@ -34,7 +34,7 @@ class HasNoTagTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\HasNoTag::triggered*/- public function testTriggeredNoTag()+ public function testTriggeredNoTag(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$journal->tags()->detach();@@ -48,7 +48,7 @@ class HasNoTagTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\HasNoTag::triggered*/- public function testTriggeredTag()+ public function testTriggeredTag(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$tag = $journal->user->tags()->first();@@ -64,7 +64,7 @@ class HasNoTagTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\HasNoTag::willMatchEverything*/- public function testWillMatchEverythingNull()+ public function testWillMatchEverythingNull(): void{$value = null;$result = HasNoTag::willMatchEverything($value);diff --git a/tests/Unit/TransactionRules/Triggers/NotesAnyTest.php b/tests/Unit/TransactionRules/Triggers/NotesAnyTest.phpindex 556eb42664..4d55a7d7ec 100644--- a/tests/Unit/TransactionRules/Triggers/NotesAnyTest.php+++ b/tests/Unit/TransactionRules/Triggers/NotesAnyTest.php@@ -35,7 +35,7 @@ class NotesAnyTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesAny::triggered*/- public function testTriggered()+ public function testTriggered(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$journal->notes()->delete();@@ -51,7 +51,7 @@ class NotesAnyTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesAny::triggered*/- public function testTriggeredEmpty()+ public function testTriggeredEmpty(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$journal->notes()->delete();@@ -67,7 +67,7 @@ class NotesAnyTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesAny::triggered*/- public function testTriggeredNone()+ public function testTriggeredNone(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$journal->notes()->delete();@@ -79,7 +79,7 @@ class NotesAnyTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesAny::willMatchEverything*/- public function testWillMatchEverythingNull()+ public function testWillMatchEverythingNull(): void{$value = null;$result = NotesAny::willMatchEverything($value);diff --git a/tests/Unit/TransactionRules/Triggers/NotesAreTest.php b/tests/Unit/TransactionRules/Triggers/NotesAreTest.phpindex 1bb3ea917f..eccbc8f127 100644--- a/tests/Unit/TransactionRules/Triggers/NotesAreTest.php+++ b/tests/Unit/TransactionRules/Triggers/NotesAreTest.php@@ -35,7 +35,7 @@ class NotesAreTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesAre::triggered*/- public function testTriggered()+ public function testTriggered(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$journal->notes()->delete();@@ -51,7 +51,7 @@ class NotesAreTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesAre::triggered*/- public function testTriggeredDifferent()+ public function testTriggeredDifferent(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$journal->notes()->delete();@@ -67,7 +67,7 @@ class NotesAreTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesAre::triggered*/- public function testTriggeredEmpty()+ public function testTriggeredEmpty(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$journal->notes()->delete();@@ -83,7 +83,7 @@ class NotesAreTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesAre::triggered*/- public function testTriggeredNone()+ public function testTriggeredNone(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$journal->notes()->delete();@@ -95,7 +95,7 @@ class NotesAreTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesAre::willMatchEverything*/- public function testWillMatchEverythingNotNull()+ public function testWillMatchEverythingNotNull(): void{$value = 'x';$result = NotesAre::willMatchEverything($value);@@ -105,7 +105,7 @@ class NotesAreTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesAre::willMatchEverything*/- public function testWillMatchEverythingNull()+ public function testWillMatchEverythingNull(): void{$value = null;$result = NotesAre::willMatchEverything($value);diff --git a/tests/Unit/TransactionRules/Triggers/NotesContainTest.php b/tests/Unit/TransactionRules/Triggers/NotesContainTest.phpindex 2ca2b43161..536eceba47 100644--- a/tests/Unit/TransactionRules/Triggers/NotesContainTest.php+++ b/tests/Unit/TransactionRules/Triggers/NotesContainTest.php@@ -35,7 +35,7 @@ class NotesContainTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesContain::triggered*/- public function testTriggered()+ public function testTriggered(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$journal->notes()->delete();@@ -51,7 +51,7 @@ class NotesContainTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesContain::triggered*/- public function testTriggeredDifferent()+ public function testTriggeredDifferent(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$journal->notes()->delete();@@ -67,7 +67,7 @@ class NotesContainTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesContain::triggered*/- public function testTriggeredEmpty()+ public function testTriggeredEmpty(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$journal->notes()->delete();@@ -83,7 +83,7 @@ class NotesContainTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesContain::triggered*/- public function testTriggeredNone()+ public function testTriggeredNone(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$journal->notes()->delete();@@ -95,7 +95,7 @@ class NotesContainTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesContain::triggered*/- public function testTriggeredPartial()+ public function testTriggeredPartial(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$journal->notes()->delete();@@ -111,7 +111,7 @@ class NotesContainTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesContain::willMatchEverything*/- public function testWillMatchEverythingEmpty()+ public function testWillMatchEverythingEmpty(): void{$value = '';$result = NotesContain::willMatchEverything($value);@@ -121,7 +121,7 @@ class NotesContainTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesContain::willMatchEverything*/- public function testWillMatchEverythingNotNull()+ public function testWillMatchEverythingNotNull(): void{$value = 'x';$result = NotesContain::willMatchEverything($value);@@ -131,7 +131,7 @@ class NotesContainTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesContain::willMatchEverything*/- public function testWillMatchEverythingNull()+ public function testWillMatchEverythingNull(): void{$value = null;$result = NotesContain::willMatchEverything($value);diff --git a/tests/Unit/TransactionRules/Triggers/NotesEmptyTest.php b/tests/Unit/TransactionRules/Triggers/NotesEmptyTest.phpindex 12910fd587..fc6c9a7440 100644--- a/tests/Unit/TransactionRules/Triggers/NotesEmptyTest.php+++ b/tests/Unit/TransactionRules/Triggers/NotesEmptyTest.php@@ -35,7 +35,7 @@ class NotesEmptyTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesEmpty::triggered*/- public function testTriggered()+ public function testTriggered(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$journal->notes()->delete();@@ -47,7 +47,7 @@ class NotesEmptyTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesEmpty::triggered*/- public function testTriggeredEmpty()+ public function testTriggeredEmpty(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$journal->notes()->delete();@@ -63,7 +63,7 @@ class NotesEmptyTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesEmpty::triggered*/- public function testTriggeredPartial()+ public function testTriggeredPartial(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$journal->notes()->delete();@@ -79,7 +79,7 @@ class NotesEmptyTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesEmpty::willMatchEverything*/- public function testWillMatchEverythingNotNull()+ public function testWillMatchEverythingNotNull(): void{$value = 'x';$result = NotesEmpty::willMatchEverything($value);diff --git a/tests/Unit/TransactionRules/Triggers/NotesEndTest.php b/tests/Unit/TransactionRules/Triggers/NotesEndTest.phpindex e410264174..b64a9b1779 100644--- a/tests/Unit/TransactionRules/Triggers/NotesEndTest.php+++ b/tests/Unit/TransactionRules/Triggers/NotesEndTest.php@@ -35,7 +35,7 @@ class NotesEndTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesEnd::triggered*/- public function testTriggered()+ public function testTriggered(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$journal->notes()->delete();@@ -51,7 +51,7 @@ class NotesEndTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesEnd::triggered*/- public function testTriggeredLonger()+ public function testTriggeredLonger(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$journal->notes()->delete();@@ -67,7 +67,7 @@ class NotesEndTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesEnd::triggered*/- public function testTriggeredNoMatch()+ public function testTriggeredNoMatch(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$journal->notes()->delete();@@ -83,7 +83,7 @@ class NotesEndTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesEnd::willMatchEverything*/- public function testWillMatchEverythingEmpty()+ public function testWillMatchEverythingEmpty(): void{$value = '';$result = NotesEnd::willMatchEverything($value);@@ -93,7 +93,7 @@ class NotesEndTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesEnd::willMatchEverything*/- public function testWillMatchEverythingNotNull()+ public function testWillMatchEverythingNotNull(): void{$value = 'x';$result = NotesEnd::willMatchEverything($value);@@ -103,7 +103,7 @@ class NotesEndTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesEnd::willMatchEverything*/- public function testWillMatchEverythingNull()+ public function testWillMatchEverythingNull(): void{$value = null;$result = NotesEnd::willMatchEverything($value);diff --git a/tests/Unit/TransactionRules/Triggers/NotesStartTest.php b/tests/Unit/TransactionRules/Triggers/NotesStartTest.phpindex 7a795bc2be..aac0578057 100644--- a/tests/Unit/TransactionRules/Triggers/NotesStartTest.php+++ b/tests/Unit/TransactionRules/Triggers/NotesStartTest.php@@ -35,7 +35,7 @@ class NotesStartTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesStart::triggered*/- public function testTriggered()+ public function testTriggered(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$journal->notes()->delete();@@ -51,7 +51,7 @@ class NotesStartTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesStart::triggered*/- public function testTriggeredLonger()+ public function testTriggeredLonger(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$journal->notes()->delete();@@ -67,7 +67,7 @@ class NotesStartTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesStart::triggered*/- public function testTriggeredNoMatch()+ public function testTriggeredNoMatch(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$journal->notes()->delete();@@ -83,7 +83,7 @@ class NotesStartTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesStart::willMatchEverything*/- public function testWillMatchEverythingEmpty()+ public function testWillMatchEverythingEmpty(): void{$value = '';$result = NotesStart::willMatchEverything($value);@@ -93,7 +93,7 @@ class NotesStartTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesStart::willMatchEverything*/- public function testWillMatchEverythingNotNull()+ public function testWillMatchEverythingNotNull(): void{$value = 'x';$result = NotesStart::willMatchEverything($value);@@ -103,7 +103,7 @@ class NotesStartTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\NotesStart::willMatchEverything*/- public function testWillMatchEverythingNull()+ public function testWillMatchEverythingNull(): void{$value = null;$result = NotesStart::willMatchEverything($value);diff --git a/tests/Unit/TransactionRules/Triggers/TagIsTest.php b/tests/Unit/TransactionRules/Triggers/TagIsTest.phpindex 8abe809705..46d9cff567 100644--- a/tests/Unit/TransactionRules/Triggers/TagIsTest.php+++ b/tests/Unit/TransactionRules/Triggers/TagIsTest.php@@ -24,6 +24,7 @@ namespace Tests\Unit\TransactionRules\Triggers;use FireflyIII\Models\TransactionJournal;use FireflyIII\TransactionRules\Triggers\TagIs;+use Illuminate\Support\Collection;use Tests\TestCase;/**@@ -34,7 +35,7 @@ class TagIsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\TagIs::triggered*/- public function testNotTriggered()+ public function testNotTriggered(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$journal->tags()->detach();@@ -48,10 +49,11 @@ class TagIsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\TagIs::triggered*/- public function testTriggered()+ public function testTriggered(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$journal->tags()->detach();+ /** @var Collection $tags */$tags = $journal->user->tags()->take(3)->get();$search = '';foreach ($tags as $index => $tag) {@@ -70,7 +72,7 @@ class TagIsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\TagIs::willMatchEverything*/- public function testWillMatchEverythingEmpty()+ public function testWillMatchEverythingEmpty(): void{$value = '';$result = TagIs::willMatchEverything($value);@@ -80,7 +82,7 @@ class TagIsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\TagIs::willMatchEverything*/- public function testWillMatchEverythingNotNull()+ public function testWillMatchEverythingNotNull(): void{$value = 'x';$result = TagIs::willMatchEverything($value);@@ -90,7 +92,7 @@ class TagIsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\TagIs::willMatchEverything*/- public function testWillMatchEverythingNull()+ public function testWillMatchEverythingNull(): void{$value = null;$result = TagIs::willMatchEverything($value);diff --git a/tests/Unit/TransactionRules/Triggers/ToAccountContainsTest.php b/tests/Unit/TransactionRules/Triggers/ToAccountContainsTest.phpindex d161459c5d..0163d93b72 100644--- a/tests/Unit/TransactionRules/Triggers/ToAccountContainsTest.php+++ b/tests/Unit/TransactionRules/Triggers/ToAccountContainsTest.php@@ -34,7 +34,7 @@ class ToAccountContainsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\ToAccountContains::triggered*/- public function testTriggered()+ public function testTriggered(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$transaction = $journal->transactions()->where('amount', '>', 0)->first();@@ -47,7 +47,7 @@ class ToAccountContainsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\ToAccountContains::triggered*/- public function testTriggeredNot()+ public function testTriggeredNot(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$trigger = ToAccountContains::makeFromStrings('some name' . random_int(1, 234), false);@@ -58,7 +58,7 @@ class ToAccountContainsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\ToAccountContains::willMatchEverything*/- public function testWillMatchEverythingEmpty()+ public function testWillMatchEverythingEmpty(): void{$value = '';$result = ToAccountContains::willMatchEverything($value);@@ -68,7 +68,7 @@ class ToAccountContainsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\ToAccountContains::willMatchEverything*/- public function testWillMatchEverythingNotNull()+ public function testWillMatchEverythingNotNull(): void{$value = 'x';$result = ToAccountContains::willMatchEverything($value);@@ -78,7 +78,7 @@ class ToAccountContainsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\ToAccountContains::willMatchEverything*/- public function testWillMatchEverythingNull()+ public function testWillMatchEverythingNull(): void{$value = null;$result = ToAccountContains::willMatchEverything($value);diff --git a/tests/Unit/TransactionRules/Triggers/ToAccountEndsTest.php b/tests/Unit/TransactionRules/Triggers/ToAccountEndsTest.phpindex 87738847d7..14b52e1e87 100644--- a/tests/Unit/TransactionRules/Triggers/ToAccountEndsTest.php+++ b/tests/Unit/TransactionRules/Triggers/ToAccountEndsTest.php@@ -34,7 +34,7 @@ class ToAccountEndsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\ToAccountEnds::triggered*/- public function testTriggered()+ public function testTriggered(): void{$count = 0;while ($count === 0) {@@ -52,7 +52,7 @@ class ToAccountEndsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\ToAccountEnds::triggered*/- public function testTriggeredLonger()+ public function testTriggeredLonger(): void{$count = 0;while ($count === 0) {@@ -70,7 +70,7 @@ class ToAccountEndsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\ToAccountEnds::triggered*/- public function testTriggeredNot()+ public function testTriggeredNot(): void{$count = 0;while ($count === 0) {@@ -86,7 +86,7 @@ class ToAccountEndsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\ToAccountEnds::willMatchEverything*/- public function testWillMatchEverythingEmpty()+ public function testWillMatchEverythingEmpty(): void{$value = '';$result = ToAccountEnds::willMatchEverything($value);@@ -96,7 +96,7 @@ class ToAccountEndsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\ToAccountEnds::willMatchEverything*/- public function testWillMatchEverythingNotNull()+ public function testWillMatchEverythingNotNull(): void{$value = 'x';$result = ToAccountEnds::willMatchEverything($value);@@ -106,7 +106,7 @@ class ToAccountEndsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\ToAccountEnds::willMatchEverything*/- public function testWillMatchEverythingNull()+ public function testWillMatchEverythingNull(): void{$value = null;$result = ToAccountEnds::willMatchEverything($value);diff --git a/tests/Unit/TransactionRules/Triggers/ToAccountIsTest.php b/tests/Unit/TransactionRules/Triggers/ToAccountIsTest.phpindex e8ae02cdff..16f68cda1e 100644--- a/tests/Unit/TransactionRules/Triggers/ToAccountIsTest.php+++ b/tests/Unit/TransactionRules/Triggers/ToAccountIsTest.php@@ -34,7 +34,7 @@ class ToAccountIsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\ToAccountIs::triggered*/- public function testTriggered()+ public function testTriggered(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$transaction = $journal->transactions()->where('amount', '>', 0)->first();@@ -48,7 +48,7 @@ class ToAccountIsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\ToAccountIs::triggered*/- public function testTriggeredNot()+ public function testTriggeredNot(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();@@ -60,7 +60,7 @@ class ToAccountIsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\ToAccountIs::willMatchEverything*/- public function testWillMatchEverythingEmpty()+ public function testWillMatchEverythingEmpty(): void{$value = '';$result = ToAccountIs::willMatchEverything($value);@@ -70,7 +70,7 @@ class ToAccountIsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\ToAccountIs::willMatchEverything*/- public function testWillMatchEverythingNotNull()+ public function testWillMatchEverythingNotNull(): void{$value = 'x';$result = ToAccountIs::willMatchEverything($value);@@ -80,7 +80,7 @@ class ToAccountIsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\ToAccountIs::willMatchEverything*/- public function testWillMatchEverythingNull()+ public function testWillMatchEverythingNull(): void{$value = null;$result = ToAccountIs::willMatchEverything($value);diff --git a/tests/Unit/TransactionRules/Triggers/ToAccountStartsTest.php b/tests/Unit/TransactionRules/Triggers/ToAccountStartsTest.phpindex f99844c634..bc5a23f749 100644--- a/tests/Unit/TransactionRules/Triggers/ToAccountStartsTest.php+++ b/tests/Unit/TransactionRules/Triggers/ToAccountStartsTest.php@@ -34,7 +34,7 @@ class ToAccountStartsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\ToAccountStarts::triggered*/- public function testTriggered()+ public function testTriggered(): void{$count = 0;while ($count === 0) {@@ -52,7 +52,7 @@ class ToAccountStartsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\ToAccountStarts::triggered*/- public function testTriggeredLonger()+ public function testTriggeredLonger(): void{$count = 0;while ($count === 0) {@@ -70,7 +70,7 @@ class ToAccountStartsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\ToAccountStarts::triggered*/- public function testTriggeredNot()+ public function testTriggeredNot(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();@@ -82,7 +82,7 @@ class ToAccountStartsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\ToAccountStarts::willMatchEverything*/- public function testWillMatchEverythingEmpty()+ public function testWillMatchEverythingEmpty(): void{$value = '';$result = ToAccountStarts::willMatchEverything($value);@@ -92,7 +92,7 @@ class ToAccountStartsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\ToAccountStarts::willMatchEverything*/- public function testWillMatchEverythingNotNull()+ public function testWillMatchEverythingNotNull(): void{$value = 'x';$result = ToAccountStarts::willMatchEverything($value);@@ -102,7 +102,7 @@ class ToAccountStartsTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\ToAccountStarts::willMatchEverything*/- public function testWillMatchEverythingNull()+ public function testWillMatchEverythingNull(): void{$value = null;$result = ToAccountStarts::willMatchEverything($value);diff --git a/tests/Unit/TransactionRules/Triggers/TransactionTypeTest.php b/tests/Unit/TransactionRules/Triggers/TransactionTypeTest.phpindex f359da8e4f..19d63a514e 100644--- a/tests/Unit/TransactionRules/Triggers/TransactionTypeTest.php+++ b/tests/Unit/TransactionRules/Triggers/TransactionTypeTest.php@@ -34,7 +34,7 @@ class TransactionTypeTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\TransactionType::triggered*/- public function testTriggered()+ public function testTriggered(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$type = $journal->transactionType->type;@@ -46,7 +46,7 @@ class TransactionTypeTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\TransactionType::triggered*/- public function testTriggeredFalse()+ public function testTriggeredFalse(): void{$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();$trigger = TransactionType::makeFromStrings('NonExisting', false);@@ -57,7 +57,7 @@ class TransactionTypeTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\TransactionType::willMatchEverything*/- public function testWillMatchEverythingNotNull()+ public function testWillMatchEverythingNotNull(): void{$value = 'x';$result = TransactionType::willMatchEverything($value);@@ -67,7 +67,7 @@ class TransactionTypeTest extends TestCase/*** @covers \FireflyIII\TransactionRules\Triggers\TransactionType::willMatchEverything*/- public function testWillMatchEverythingNull()+ public function testWillMatchEverythingNull(): void{$value = null;$result = TransactionType::willMatchEverything($value);diff --git a/tests/Unit/Transformers/AccountTransformerTest.php b/tests/Unit/Transformers/AccountTransformerTest.phpindex 90d2e76505..4e7bd534d9 100644--- a/tests/Unit/Transformers/AccountTransformerTest.php+++ b/tests/Unit/Transformers/AccountTransformerTest.php@@ -45,7 +45,7 @@ class AccountTransformerTest extends TestCase** @covers \FireflyIII\Transformers\AccountTransformer::transform*/- public function testBasic()+ public function testBasic(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$accountRepos->shouldReceive('setUser');@@ -83,7 +83,7 @@ class AccountTransformerTest extends TestCase** @covers \FireflyIII\Transformers\AccountTransformer::transform*/- public function testBasicDate()+ public function testBasicDate(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$accountRepos->shouldReceive('setUser');@@ -121,7 +121,7 @@ class AccountTransformerTest extends TestCase** @covers \FireflyIII\Transformers\AccountTransformer::transform*/- public function testCCDataAsset()+ public function testCCDataAsset(): void{// make new account:$account = Account::create(@@ -212,7 +212,7 @@ class AccountTransformerTest extends TestCase** @covers \FireflyIII\Transformers\AccountTransformer::transform*/- public function testIgnoreCCExpense()+ public function testIgnoreCCExpense(): void{// make new account:@@ -297,7 +297,7 @@ class AccountTransformerTest extends TestCase** @covers \FireflyIII\Transformers\AccountTransformer::transform*/- public function testOpeningBalance()+ public function testOpeningBalance(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$accountRepos->shouldReceive('setUser');@@ -355,7 +355,7 @@ class AccountTransformerTest extends TestCase** @covers \FireflyIII\Transformers\AccountTransformer::transform*/- public function testWithCurrency()+ public function testWithCurrency(): void{$accountRepos = $this->mock(AccountRepositoryInterface::class);$accountRepos->shouldReceive('setUser');@@ -401,7 +401,7 @@ class AccountTransformerTest extends TestCase** @covers \FireflyIII\Transformers\AccountTransformer::transform*/- public function testWithNotes()+ public function testWithNotes(): void{// make new account:$account = Account::create(diff --git a/tests/Unit/Transformers/AttachmentTransformerTest.php b/tests/Unit/Transformers/AttachmentTransformerTest.phpindex e7b8034c3a..6c6869a7f3 100644--- a/tests/Unit/Transformers/AttachmentTransformerTest.php+++ b/tests/Unit/Transformers/AttachmentTransformerTest.php@@ -39,7 +39,7 @@ class AttachmentTransformerTest extends TestCase** @covers \FireflyIII\Transformers\AttachmentTransformer::transform*/- public function testBasic()+ public function testBasic(): void{$md5 = md5('hello' . random_int(1, 10000));$attachment = Attachment::create(diff --git a/tests/Unit/Transformers/BillTransformerTest.php b/tests/Unit/Transformers/BillTransformerTest.phpindex a7a0c714d8..c46b5e0157 100644--- a/tests/Unit/Transformers/BillTransformerTest.php+++ b/tests/Unit/Transformers/BillTransformerTest.php@@ -44,7 +44,7 @@ class BillTransformerTest extends TestCase* @covers \FireflyIII\Transformers\BillTransformer::paidData* @covers \FireflyIII\Transformers\BillTransformer::payDates*/- public function testBasic()+ public function testBasic(): void{$bill = Bill::create(@@ -73,7 +73,7 @@ class BillTransformerTest extends TestCase** @covers \FireflyIII\Transformers\BillTransformer::transform*/- public function testNote()+ public function testNote(): void{$bill = Bill::create(@@ -115,7 +115,7 @@ class BillTransformerTest extends TestCase* @covers \FireflyIII\Transformers\BillTransformer::lastPaidDate* @covers \FireflyIII\Transformers\BillTransformer::nextDateMatch*/- public function testWithDates()+ public function testWithDates(): void{// mock stuff$repository = $this->mock(BillRepositoryInterface::class);diff --git a/tests/Unit/Transformers/BudgetTransformerTest.php b/tests/Unit/Transformers/BudgetTransformerTest.phpindex a9554212b3..576bdb767c 100644--- a/tests/Unit/Transformers/BudgetTransformerTest.php+++ b/tests/Unit/Transformers/BudgetTransformerTest.php@@ -39,7 +39,7 @@ class BudgetTransformerTest extends TestCase** @covers \FireflyIII\Transformers\BudgetTransformer::transform*/- public function testBasic()+ public function testBasic(): void{$budget = Budget::create(diff --git a/tests/Unit/Transformers/CategoryTransformerTest.php b/tests/Unit/Transformers/CategoryTransformerTest.phpindex 68cdae5e43..702842a883 100644--- a/tests/Unit/Transformers/CategoryTransformerTest.php+++ b/tests/Unit/Transformers/CategoryTransformerTest.php@@ -39,7 +39,7 @@ class CategoryTransformerTest extends TestCase** @covers \FireflyIII\Transformers\CategoryTransformer::transform*/- public function testBasic()+ public function testBasic(): void{$category = Category::create(diff --git a/tests/Unit/Transformers/JournalMetaTransformerTest.php b/tests/Unit/Transformers/JournalMetaTransformerTest.phpindex 4b4a970b59..bb877867b9 100644--- a/tests/Unit/Transformers/JournalMetaTransformerTest.php+++ b/tests/Unit/Transformers/JournalMetaTransformerTest.php@@ -38,7 +38,7 @@ class JournalMetaTransformerTest extends TestCase** @covers \FireflyIII\Transformers\JournalMetaTransformer::transform*/- public function testBasic()+ public function testBasic(): void{$data = 'Lots of data';$hash = hash('sha256', json_encode($data));diff --git a/tests/Unit/Transformers/PiggyBankEventTransformerTest.php b/tests/Unit/Transformers/PiggyBankEventTransformerTest.phpindex 967f2b2dde..68a5de351a 100644--- a/tests/Unit/Transformers/PiggyBankEventTransformerTest.php+++ b/tests/Unit/Transformers/PiggyBankEventTransformerTest.php@@ -43,7 +43,7 @@ class PiggyBankEventTransformerTest extends TestCase** @covers \FireflyIII\Transformers\PiggyBankEventTransformer::transform*/- public function testBasic()+ public function testBasic(): void{// make new account:$account = Account::create(@@ -87,7 +87,7 @@ class PiggyBankEventTransformerTest extends TestCase** @covers \FireflyIII\Transformers\PiggyBankEventTransformer::transform*/- public function testBasicCurrency()+ public function testBasicCurrency(): void{// mock repository.$repository = $this->mock(CurrencyRepositoryInterface::class);diff --git a/tests/Unit/Transformers/PiggyBankTransformerTest.php b/tests/Unit/Transformers/PiggyBankTransformerTest.phpindex db311a65ae..3bfd20df9a 100644--- a/tests/Unit/Transformers/PiggyBankTransformerTest.php+++ b/tests/Unit/Transformers/PiggyBankTransformerTest.php@@ -44,7 +44,7 @@ class PiggyBankTransformerTest extends TestCase** @covers \FireflyIII\Transformers\PiggyBankTransformer::transform()*/- public function testBasic()+ public function testBasic(): void{// mock repository:$repository = $this->mock(PiggyBankRepositoryInterface::class);@@ -87,7 +87,7 @@ class PiggyBankTransformerTest extends TestCase** @covers \FireflyIII\Transformers\PiggyBankTransformer::transform()*/- public function testBasicWithCurrency()+ public function testBasicWithCurrency(): void{// mock repository.$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);@@ -144,7 +144,7 @@ class PiggyBankTransformerTest extends TestCase** @covers \FireflyIII\Transformers\PiggyBankTransformer::transform()*/- public function testBasicWithCurrencyAndNote()+ public function testBasicWithCurrencyAndNote(): void{// mock repository.$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);diff --git a/tests/Unit/Transformers/TagTransformerTest.php b/tests/Unit/Transformers/TagTransformerTest.phpindex 16326f0a10..de3e80cb64 100644--- a/tests/Unit/Transformers/TagTransformerTest.php+++ b/tests/Unit/Transformers/TagTransformerTest.php@@ -39,7 +39,7 @@ class TagTransformerTest extends TestCase** @covers \FireflyIII\Transformers\TagTransformer::transform*/- public function testBasic()+ public function testBasic(): void{$tag = Tag::create([diff --git a/tests/Unit/Transformers/TransactionTransformerTest.php b/tests/Unit/Transformers/TransactionTransformerTest.phpindex 6c891c424d..a75ddcdce1 100644--- a/tests/Unit/Transformers/TransactionTransformerTest.php+++ b/tests/Unit/Transformers/TransactionTransformerTest.php@@ -24,6 +24,7 @@ declare(strict_types=1);namespace Tests\Unit\Transformers;+use FireflyIII\Exceptions\FireflyException;use FireflyIII\Helpers\Collector\JournalCollector;use FireflyIII\Helpers\Filter\NegativeAmountFilter;use FireflyIII\Helpers\Filter\PositiveAmountFilter;@@ -48,9 +49,8 @@ class TransactionTransformerTest extends TestCase* Basic journal (withdrawal)** @covers \FireflyIII\Transformers\TransactionTransformer::transform- * throws \FireflyIII\Exceptions\FireflyException*/- public function testBasic()+ public function testBasic(): void{// make new asset account:$asset = Account::create(@@ -103,7 +103,11 @@ class TransactionTransformerTest extends TestCase// use collector to get it:$transaction = $this->getTransaction($journal);$transformer = new TransactionTransformer(new ParameterBag);- $result = $transformer->transform($transaction);+ try {+ $result = $transformer->transform($transaction);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }// basic fields:$this->assertEquals($journal->id, $result['journal_id']);$this->assertEquals('Withdrawal', $result['type']);@@ -134,7 +138,7 @@ class TransactionTransformerTest extends TestCase* @covers \FireflyIII\Transformers\TransactionTransformer::transform* throws \FireflyIII\Exceptions\FireflyException*/- public function testDeposit()+ public function testDeposit(): void{// make new asset account:$asset = Account::create(@@ -187,7 +191,11 @@ class TransactionTransformerTest extends TestCase// use collector to get it:$transaction = $this->getTransaction($journal);$transformer = new TransactionTransformer(new ParameterBag);- $result = $transformer->transform($transaction);+ try {+ $result = $transformer->transform($transaction);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }// basic fields:$this->assertEquals($journal->id, $result['journal_id']);$this->assertEquals('Deposit', $result['type']);@@ -218,7 +226,7 @@ class TransactionTransformerTest extends TestCase* @covers \FireflyIII\Transformers\TransactionTransformer::transform* throws \FireflyIII\Exceptions\FireflyException*/- public function testDepositBudget()+ public function testDepositBudget(): void{// make new asset account:$asset = Account::create(@@ -281,7 +289,11 @@ class TransactionTransformerTest extends TestCase// use collector to get it:$transaction = $this->getTransaction($journal);$transformer = new TransactionTransformer(new ParameterBag);- $result = $transformer->transform($transaction);+ try {+ $result = $transformer->transform($transaction);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }// basic fields:$this->assertEquals($journal->id, $result['journal_id']);$this->assertEquals('Deposit', $result['type']);@@ -311,7 +323,7 @@ class TransactionTransformerTest extends TestCase* @covers \FireflyIII\Transformers\TransactionTransformer::transform* throws \FireflyIII\Exceptions\FireflyException*/- public function testForeignAmount()+ public function testForeignAmount(): void{// make new asset account:$asset = Account::create(@@ -368,7 +380,11 @@ class TransactionTransformerTest extends TestCase// use collector to get it:$transaction = $this->getTransaction($journal);$transformer = new TransactionTransformer(new ParameterBag);- $result = $transformer->transform($transaction);+ try {+ $result = $transformer->transform($transaction);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }// basic fields:$this->assertEquals($journal->id, $result['journal_id']);$this->assertEquals('Withdrawal', $result['type']);@@ -403,7 +419,7 @@ class TransactionTransformerTest extends TestCase* @covers \FireflyIII\Transformers\TransactionTransformer::transform* throws \FireflyIII\Exceptions\FireflyException*/- public function testJournalBudget()+ public function testJournalBudget(): void{// make new asset account:$asset = Account::create(@@ -467,7 +483,11 @@ class TransactionTransformerTest extends TestCase// use collector to get it:$transaction = $this->getTransaction($journal);$transformer = new TransactionTransformer(new ParameterBag);- $result = $transformer->transform($transaction);+ try {+ $result = $transformer->transform($transaction);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }// basic fields:$this->assertEquals($journal->id, $result['journal_id']);$this->assertEquals('Withdrawal', $result['type']);@@ -501,7 +521,7 @@ class TransactionTransformerTest extends TestCase* @covers \FireflyIII\Transformers\TransactionTransformer::transform* throws \FireflyIII\Exceptions\FireflyException*/- public function testJournalCategory()+ public function testJournalCategory(): void{// make new asset account:$asset = Account::create(@@ -565,7 +585,11 @@ class TransactionTransformerTest extends TestCase// use collector to get it:$transaction = $this->getTransaction($journal);$transformer = new TransactionTransformer(new ParameterBag);- $result = $transformer->transform($transaction);+ try {+ $result = $transformer->transform($transaction);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }// basic fields:$this->assertEquals($journal->id, $result['journal_id']);$this->assertEquals('Withdrawal', $result['type']);@@ -599,7 +623,7 @@ class TransactionTransformerTest extends TestCase* @covers \FireflyIII\Transformers\TransactionTransformer::transform* throws \FireflyIII\Exceptions\FireflyException*/- public function testOpeningBalanceNeg()+ public function testOpeningBalanceNeg(): void{// make new asset account:$asset = Account::create(@@ -652,7 +676,11 @@ class TransactionTransformerTest extends TestCase// use collector to get it:$transaction = $this->getTransaction($journal);$transformer = new TransactionTransformer(new ParameterBag);- $result = $transformer->transform($transaction);+ try {+ $result = $transformer->transform($transaction);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }// basic fields:$this->assertEquals($journal->id, $result['journal_id']);$this->assertEquals('Opening balance', $result['type']);@@ -684,7 +712,7 @@ class TransactionTransformerTest extends TestCase* @covers \FireflyIII\Transformers\TransactionTransformer::transform* throws \FireflyIII\Exceptions\FireflyException*/- public function testOpeningBalancePos()+ public function testOpeningBalancePos(): void{// make new asset account:$asset = Account::create(@@ -738,7 +766,11 @@ class TransactionTransformerTest extends TestCase// use collector to get it:$transaction = $this->getTransaction($journal);$transformer = new TransactionTransformer(new ParameterBag);- $result = $transformer->transform($transaction);+ try {+ $result = $transformer->transform($transaction);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }// basic fields:$this->assertEquals($journal->id, $result['journal_id']);$this->assertEquals('Opening balance', $result['type']);@@ -769,7 +801,7 @@ class TransactionTransformerTest extends TestCase* @covers \FireflyIII\Transformers\TransactionTransformer::transform* throws \FireflyIII\Exceptions\FireflyException*/- public function testReconciliationNeg()+ public function testReconciliationNeg(): void{// make new asset account:$asset = Account::create(@@ -823,7 +855,11 @@ class TransactionTransformerTest extends TestCase// use collector to get it:$transaction = $this->getTransaction($journal);$transformer = new TransactionTransformer(new ParameterBag);- $result = $transformer->transform($transaction);+ try {+ $result = $transformer->transform($transaction);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }// basic fields:$this->assertEquals($journal->id, $result['journal_id']);$this->assertEquals('Reconciliation', $result['type']);@@ -854,7 +890,7 @@ class TransactionTransformerTest extends TestCase* @covers \FireflyIII\Transformers\TransactionTransformer::transform* throws \FireflyIII\Exceptions\FireflyException*/- public function testReconciliationPos()+ public function testReconciliationPos(): void{// make new asset account:$asset = Account::create(@@ -908,7 +944,11 @@ class TransactionTransformerTest extends TestCase// use collector to get it:$transaction = $this->getTransaction($journal);$transformer = new TransactionTransformer(new ParameterBag);- $result = $transformer->transform($transaction);+ try {+ $result = $transformer->transform($transaction);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }// basic fields:$this->assertEquals($journal->id, $result['journal_id']);$this->assertEquals('Reconciliation', $result['type']);@@ -939,7 +979,7 @@ class TransactionTransformerTest extends TestCase* @covers \FireflyIII\Transformers\TransactionTransformer::transform* throws \FireflyIII\Exceptions\FireflyException*/- public function testTransactionBudget()+ public function testTransactionBudget(): void{// make new asset account:$asset = Account::create(@@ -1005,7 +1045,11 @@ class TransactionTransformerTest extends TestCase// use collector to get it:$transaction = $this->getTransaction($journal);$transformer = new TransactionTransformer(new ParameterBag);- $result = $transformer->transform($transaction);+ try {+ $result = $transformer->transform($transaction);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }// basic fields:$this->assertEquals($journal->id, $result['journal_id']);$this->assertEquals('Withdrawal', $result['type']);@@ -1039,7 +1083,7 @@ class TransactionTransformerTest extends TestCase* @covers \FireflyIII\Transformers\TransactionTransformer::transform* throws \FireflyIII\Exceptions\FireflyException*/- public function testTransactionCategory()+ public function testTransactionCategory(): void{// make new asset account:$asset = Account::create(@@ -1104,7 +1148,11 @@ class TransactionTransformerTest extends TestCase// use collector to get it:$transaction = $this->getTransaction($journal);$transformer = new TransactionTransformer(new ParameterBag);- $result = $transformer->transform($transaction);+ try {+ $result = $transformer->transform($transaction);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }// basic fields:$this->assertEquals($journal->id, $result['journal_id']);$this->assertEquals('Withdrawal', $result['type']);@@ -1138,7 +1186,7 @@ class TransactionTransformerTest extends TestCase* @covers \FireflyIII\Transformers\TransactionTransformer::transform* throws \FireflyIII\Exceptions\FireflyException*/- public function testTransactionDescription()+ public function testTransactionDescription(): void{// make new asset account:$asset = Account::create(@@ -1191,7 +1239,11 @@ class TransactionTransformerTest extends TestCase// use collector to get it:$transaction = $this->getTransaction($journal);$transformer = new TransactionTransformer(new ParameterBag);- $result = $transformer->transform($transaction);+ try {+ $result = $transformer->transform($transaction);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }// basic fields:$this->assertEquals($journal->id, $result['journal_id']);$this->assertEquals('Withdrawal', $result['type']);@@ -1222,7 +1274,7 @@ class TransactionTransformerTest extends TestCase* @covers \FireflyIII\Transformers\TransactionTransformer::transform* throws \FireflyIII\Exceptions\FireflyException*/- public function testTransferOne()+ public function testTransferOne(): void{// make new asset account:$left = Account::create(@@ -1275,7 +1327,11 @@ class TransactionTransformerTest extends TestCase// use collector to get it:$transaction = $this->getTransaction($journal);$transformer = new TransactionTransformer(new ParameterBag);- $result = $transformer->transform($transaction);+ try {+ $result = $transformer->transform($transaction);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }// basic fields:$this->assertEquals($journal->id, $result['journal_id']);$this->assertEquals('Transfer', $result['type']);@@ -1306,7 +1362,7 @@ class TransactionTransformerTest extends TestCase* @covers \FireflyIII\Transformers\TransactionTransformer::transform* throws \FireflyIII\Exceptions\FireflyException*/- public function testTransferTwo()+ public function testTransferTwo(): void{// make new asset account:$left = Account::create(@@ -1361,7 +1417,11 @@ class TransactionTransformerTest extends TestCase// use collector to get it:$transaction = $this->getTransaction($journal);$transformer = new TransactionTransformer(new ParameterBag);- $result = $transformer->transform($transaction);+ try {+ $result = $transformer->transform($transaction);+ } catch (FireflyException $e) {+ $this->assertTrue(false, $e->getMessage());+ }// basic fields:$this->assertEquals($journal->id, $result['journal_id']);$this->assertEquals('Transfer', $result['type']);diff --git a/tests/Unit/Transformers/UserTransformerTest.php b/tests/Unit/Transformers/UserTransformerTest.phpindex a4210037f1..e3d89383cb 100644--- a/tests/Unit/Transformers/UserTransformerTest.php+++ b/tests/Unit/Transformers/UserTransformerTest.php@@ -39,7 +39,7 @@ class UserTransformerTest extends TestCase** @covers \FireflyIII\Transformers\UserTransformer::transform*/- public function testBasic()+ public function testBasic(): void{$user = $this->user();$transformer = new UserTransformer(new ParameterBag());@@ -54,7 +54,7 @@ class UserTransformerTest extends TestCase** @covers \FireflyIII\Transformers\UserTransformer::transform*/- public function testEmptyUser()+ public function testEmptyUser(): void{$user = $this->emptyUser();$transformer = new UserTransformer(new ParameterBag());