mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-21 19:47:48 +00:00
Fix test coverage.
This commit is contained in:
@@ -122,9 +122,16 @@ class MassControllerTest extends TestCase
|
||||
$journalRepos->shouldReceive('getJournalSourceAccounts')->andReturn(new Collection([$source]));
|
||||
$journalRepos->shouldReceive('getJournalDestinationAccounts')->andReturn(new Collection([$source]));
|
||||
$journalRepos->shouldReceive('getTransactionType')->andReturn('Transfer');
|
||||
|
||||
$journalRepos->shouldReceive('isJournalReconciled')->andReturn(false);
|
||||
$journalRepos->shouldReceive('getFirstPosTransaction')->andReturn($transfers->first()->transactions()->first());
|
||||
|
||||
// get all kinds of meta fields (the transformer needs this)
|
||||
$journalRepos->shouldReceive('getNoteText')->andReturn('Hello');
|
||||
$journalRepos->shouldReceive('getMetaField')->withAnyArgs()->andReturnNull();
|
||||
$journalRepos->shouldReceive('getMetaDateString')->withAnyArgs()->andReturnNull();
|
||||
|
||||
|
||||
|
||||
// mock stuff:
|
||||
$repository = $this->mock(AccountRepositoryInterface::class);
|
||||
@@ -172,6 +179,11 @@ class MassControllerTest extends TestCase
|
||||
$journalRepos->shouldReceive('isJournalReconciled')
|
||||
->andReturn(true, false, false, false, false);
|
||||
|
||||
// get all kinds of meta fields (the transformer needs this)
|
||||
$journalRepos->shouldReceive('getNoteText')->andReturn('Hello');
|
||||
$journalRepos->shouldReceive('getMetaField')->withAnyArgs()->andReturnNull();
|
||||
$journalRepos->shouldReceive('getMetaDateString')->withAnyArgs()->andReturnNull();
|
||||
|
||||
|
||||
// default transactions
|
||||
$collection = $this->user()->transactionJournals()->take(5)->get();
|
||||
|
Reference in New Issue
Block a user