Fix tests that broke during Laravel 5.6 upgrade

This commit is contained in:
James Cole
2018-03-09 06:46:45 +01:00
parent ace2ed8bd0
commit 04b2eaf535
6 changed files with 73 additions and 143 deletions

View File

@@ -102,8 +102,9 @@ class ExportControllerTest extends TestCase
$repository = $this->mock(ExportJobRepositoryInterface::class);
$accountRepos = $this->mock(AccountRepositoryInterface::class);
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$job = ExportJob::first();
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$repository->shouldReceive('create')->andReturn(new ExportJob);
$repository->shouldReceive('create')->andReturn($job);
$repository->shouldReceive('cleanup');
$accountRepos->shouldReceive('getAccountsByType')->withArgs([[AccountType::DEFAULT, AccountType::ASSET]])->andReturn(new Collection);