Various code coverage and test related fixes.

This commit is contained in:
James Cole
2017-04-22 07:05:31 +02:00
parent ee08fc2421
commit e3cd11ec2e
17 changed files with 238 additions and 74 deletions

View File

@@ -161,9 +161,11 @@ class PiggyBankControllerTest extends TestCase
// mock stuff
$repository = $this->mock(PiggyBankRepositoryInterface::class);
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$piggyBank = factory(PiggyBank::class)->make();
$one = factory(PiggyBank::class)->make();
$two = factory(PiggyBank::class)->make();
$two->account_id = $one->account_id;
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$repository->shouldReceive('getPiggyBanks')->andReturn(new Collection([$piggyBank]));
$repository->shouldReceive('getPiggyBanks')->andReturn(new Collection([$one, $two]));
Steam::shouldReceive('balanceIgnoreVirtual')->twice()->andReturn('1');