Update test code.

This commit is contained in:
James Cole
2018-05-11 19:58:10 +02:00
parent 9bb4df4cc3
commit 4d6bc55723
174 changed files with 2138 additions and 940 deletions

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