mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-17 07:08:19 +00:00
Update test code.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user