Update test code.

This commit is contained in:
James Cole 2018-05-11 19:58:10 +02:00
parent 9bb4df4cc3
commit 4d6bc55723
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
174 changed files with 2138 additions and 940 deletions

View File

@ -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');

View File

@ -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);

View File

@ -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();

View File

@ -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);

View File

@ -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]);

View File

@ -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';

View File

@ -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 = [

View File

@ -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);

View File

@ -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;

View File

@ -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();

View File

@ -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:

View File

@ -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;

View File

@ -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();

View File

@ -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);

View File

@ -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();

View File

@ -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();

View File

@ -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);

View File

@ -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());

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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'));

View File

@ -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);

View File

@ -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 test
Preference::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 test
Preference::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();

View File

@ -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);

View File

@ -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());

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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();

View File

@ -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);

View File

@ -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']));

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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 = [

View File

@ -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);

View File

@ -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' => 'new@example.com',
@ -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', 'previous@example.com');
$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', 'previous@example.comX');
@ -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);

View File

@ -47,7 +47,7 @@ class AccountControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Report\AccountController::general
*/
public function testGeneral()
public function testGeneral(): void
{
$return = [
'accounts' => [],

View File

@ -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);

View File

@ -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']];

View File

@ -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();

View File

@ -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();

View File

@ -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 => [

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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();

View File

@ -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);

View File

@ -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();

View File

@ -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);

View File

@ -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);

View File

@ -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')

View File

@ -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 TestCase
try {
$this->expectsEvents(UpdatedTransactionJournal::class);
} catch (Exception $e) {
$this->assertTrue(false, 'expectsEvents failed!');
$this->assertTrue(false, $e->getMessage());
}
$journal = new TransactionJournal();

View File

@ -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);

View File

@ -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);

View File

@ -32,7 +32,7 @@ class ExampleTest extends TestCase
/**
* A basic test example.
*/
public function testBasicTest()
public function testBasicTest(): void
{
$response = $this->get('/login');

View File

@ -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 BaseTestCase
Preference::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);

View File

@ -32,7 +32,7 @@ class ExampleTest extends TestCase
/**
* A basic test example.
*/
public function testBasicTest()
public function testBasicTest(): void
{
$this->assertTrue(true);
}

View File

@ -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 = [

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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();

View File

@ -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);

View File

@ -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 */

View File

@ -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);

View File

@ -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();

View File

@ -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);

View File

@ -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();

View File

@ -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);

View File

@ -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();

View File

@ -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;

View File

@ -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;

View File

@ -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();

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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');

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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'];

View File

@ -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'];

View File

@ -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();

Some files were not shown because too many files have changed in this diff Show More