Fix various tests.

This commit is contained in:
James Cole
2018-03-11 21:19:35 +01:00
parent c8f52a1c40
commit 3fdb782321
7 changed files with 32 additions and 26 deletions

View File

@@ -53,7 +53,7 @@ class ImportAccountTest extends TestCase
$repository->shouldReceive('setUser')->once()->withArgs([Mockery::any()]);
$repository->shouldReceive('getAccountType')->twice()->withArgs([AccountType::ASSET])->andReturn($accountType);
$repository->shouldReceive('getAccountsByType')->twice()->withArgs([[AccountType::ASSET]])->andReturn(new Collection());
$repository->shouldReceive('find')->once()->withArgs([1])->andReturn($account);
$repository->shouldReceive('findNull')->once()->withArgs([1])->andReturn($account);
// create import account.
$importAccount = new ImportAccount;
@@ -79,8 +79,6 @@ class ImportAccountTest extends TestCase
// mock calls:
$repository->shouldReceive('setUser')->once()->withArgs([Mockery::any()]);
$repository->shouldReceive('getAccountType')->once()->withArgs([AccountType::ASSET])->andReturn($accountType);
//$repository->shouldReceive('getAccountsByType')->once()->withArgs([[AccountType::ASSET]])->andReturn(new Collection());
//$repository->shouldReceive('find')->once()->withArgs([1])->andReturn($account);
// create import account.
$importAccount = new ImportAccount;