Fix tests

This commit is contained in:
James Cole
2018-06-02 20:02:42 +02:00
parent 2f824ba1a8
commit 332d32c319
3 changed files with 91 additions and 88 deletions

View File

@@ -156,10 +156,10 @@ class TagControllerTest extends TestCase
$collector = $this->mock(JournalCollectorInterface::class);
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
$repository->shouldReceive('spentInPeriod')->andReturn('-1')->times(2);
$repository->shouldReceive('spentInPeriod')->andReturn('-1')->times(3);
$repository->shouldReceive('firstUseDate')->andReturn(new Carbon)->once();
$repository->shouldReceive('lastUseDate')->andReturn(new Carbon)->once();
$repository->shouldReceive('earnedInPeriod')->andReturn('1')->times(2);
$repository->shouldReceive('earnedInPeriod')->andReturn('1')->times(3);
$repository->shouldReceive('sumsOfTag')->andReturn($amounts)->once();
$collector->shouldReceive('removeFilter')->andReturnSelf()->once();
@@ -225,10 +225,10 @@ class TagControllerTest extends TestCase
$collector = $this->mock(JournalCollectorInterface::class);
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
$repository->shouldReceive('spentInPeriod')->andReturn('-1')->times(2);
$repository->shouldReceive('spentInPeriod')->andReturn('-1')->times(3);
$repository->shouldReceive('firstUseDate')->andReturn(new Carbon)->once();
$repository->shouldReceive('lastUseDate')->andReturn(new Carbon)->once();
$repository->shouldReceive('earnedInPeriod')->andReturn('1')->times(2);
$repository->shouldReceive('earnedInPeriod')->andReturn('1')->times(3);
$collector->shouldReceive('removeFilter')->andReturnSelf()->once();
$collector->shouldReceive('setAllAssetAccounts')->andReturnSelf()->once();