Update some tests.

This commit is contained in:
James Cole
2020-01-05 19:29:28 +01:00
parent 465947dddf
commit 39d61feede
26 changed files with 211 additions and 140 deletions

View File

@@ -74,6 +74,7 @@ class AccountTransformerTest extends TestCase
$accountRepos->shouldReceive('getAccountType')->andReturn('Asset account')->atLeast()->once();
$accountRepos->shouldReceive('getAccountCurrency')->andReturn($euro)->atLeast()->once();
$accountRepos->shouldReceive('getNoteText')->andReturn('I am a note')->atLeast()->once();
$accountRepos->shouldReceive('getLocation')->atLeast()->once()->andReturnNull();
// get all kinds of meta values:
$accountRepos->shouldReceive('getMetaValue')->withArgs([Mockery::any(), 'account_role'])->andReturn('defaultAsset')->atLeast()->once();
@@ -142,6 +143,7 @@ class AccountTransformerTest extends TestCase
$accountRepos->shouldReceive('getAccountType')->andReturn('Asset account')->atLeast()->once();
$accountRepos->shouldReceive('getAccountCurrency')->andReturn($euro)->atLeast()->once();
$accountRepos->shouldReceive('getNoteText')->andReturn('I am a note')->atLeast()->once();
$accountRepos->shouldReceive('getLocation')->atLeast()->once()->andReturnNull();
// get all kinds of meta values:
$accountRepos->shouldReceive('getMetaValue')->withArgs([Mockery::any(), 'account_role'])->andReturn('defaultAsset')->atLeast()->once();
@@ -210,6 +212,7 @@ class AccountTransformerTest extends TestCase
$accountRepos->shouldReceive('getAccountType')->andReturn('Asset account')->atLeast()->once();
$accountRepos->shouldReceive('getAccountCurrency')->andReturn($euro)->atLeast()->once();
$accountRepos->shouldReceive('getNoteText')->andReturn('I am a note')->atLeast()->once();
$accountRepos->shouldReceive('getLocation')->atLeast()->once()->andReturnNull();
// get all kinds of meta values:
$accountRepos->shouldReceive('getMetaValue')->withArgs([Mockery::any(), 'account_role'])->andReturn('ccAsset')->atLeast()->once();
@@ -285,6 +288,7 @@ class AccountTransformerTest extends TestCase
$accountRepos->shouldReceive('getAccountType')->andReturn('Mortgage')->atLeast()->once();
$accountRepos->shouldReceive('getAccountCurrency')->andReturn($euro)->atLeast()->once();
$accountRepos->shouldReceive('getNoteText')->andReturn('I am a note')->atLeast()->once();
$accountRepos->shouldReceive('getLocation')->atLeast()->once()->andReturnNull();
// get all kinds of meta values:
$accountRepos->shouldReceive('getMetaValue')->withArgs([Mockery::any(), 'account_role'])->andReturn('')->atLeast()->once();
@@ -359,6 +363,7 @@ class AccountTransformerTest extends TestCase
$accountRepos->shouldReceive('getAccountType')->andReturn('Expense account')->atLeast()->once();
$accountRepos->shouldReceive('getAccountCurrency')->andReturn($euro)->atLeast()->once();
$accountRepos->shouldReceive('getNoteText')->andReturn('I am a note')->atLeast()->once();
$accountRepos->shouldReceive('getLocation')->atLeast()->once()->andReturnNull();
// get all kinds of meta values:
$accountRepos->shouldReceive('getMetaValue')->withArgs([Mockery::any(), 'account_role'])->andReturn('defaultAsset')->atLeast()->once();