Improve test coverage and fix test code.

This commit is contained in:
James Cole
2018-08-23 18:33:39 +02:00
parent 3f493aceb2
commit d4096103cb
21 changed files with 1378 additions and 21 deletions

View File

@@ -78,6 +78,7 @@ class ShowControllerTest extends TestCase
$repository = $this->mock(AccountRepositoryInterface::class);
$repository->shouldReceive('oldestJournalDate')->andReturn(clone $date)->once();
$repository->shouldReceive('getMetaValue')->andReturn('');
$repository->shouldReceive('isLiability')->andReturn(false);
$transaction = factory(Transaction::class)->make();
@@ -125,6 +126,7 @@ class ShowControllerTest extends TestCase
$repository = $this->mock(AccountRepositoryInterface::class);
$repository->shouldReceive('oldestJournalDate')->andReturn(clone $date)->once();
$repository->shouldReceive('getMetaValue')->andReturn('');
$repository->shouldReceive('isLiability')->andReturn(false);
$transaction = factory(Transaction::class)->make();
@@ -206,6 +208,7 @@ class ShowControllerTest extends TestCase
$repository = $this->mock(AccountRepositoryInterface::class);
$repository->shouldReceive('oldestJournalDate')->andReturn(new Carbon);
$repository->shouldReceive('getMetaValue')->andReturn('');
$repository->shouldReceive('isLiability')->andReturn(false);
$collector->shouldReceive('setTypes')->andReturnSelf();
$collector->shouldReceive('withOpposingAccount')->andReturnSelf();