mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-09 20:11:22 +00:00
Improve test coverage.
This commit is contained in:
@@ -435,7 +435,7 @@ class AccountControllerTest extends TestCase
|
||||
$fiscalHelper->shouldReceive('startOfFiscalYear')->atLeast()->once()->andReturn($date);
|
||||
$accountRepos->shouldReceive('getMetaValue')->withArgs([Mockery::any(), 'currency_id'])->andReturn('1')->atLeast()->once();
|
||||
|
||||
$currencyRepos->shouldReceive('findNull')->andReturn(TransactionCurrency::find(1), null);
|
||||
$currencyRepos->shouldReceive('findNull')->andReturn($this->getEuro(), null);
|
||||
|
||||
$generator->shouldReceive('multiSet')->andReturn([]);
|
||||
Steam::shouldReceive('balanceInRange')->andReturn(['2012-01-01' => '0']);
|
||||
@@ -482,7 +482,7 @@ class AccountControllerTest extends TestCase
|
||||
Steam::shouldReceive('balancesPerCurrencyByAccounts')->twice()->andReturn($start, $end);
|
||||
|
||||
// currency should be looking for the currency ID's:
|
||||
$currencyRepos->shouldReceive('findNull')->withArgs([1])->once()->andReturn(TransactionCurrency::find(1));
|
||||
$currencyRepos->shouldReceive('findNull')->withArgs([1])->once()->andReturn($this->getEuro());
|
||||
$currencyRepos->shouldReceive('findNull')->withArgs([2])->once()->andReturn(TransactionCurrency::find(2));
|
||||
|
||||
$generator->shouldReceive('multiSet')->andReturn([])->once();
|
||||
|
||||
@@ -66,7 +66,7 @@ class BillControllerTest extends TestCase
|
||||
2 => '100',
|
||||
];
|
||||
|
||||
$currencyRepos->shouldReceive('findNull')->once()->andReturn(TransactionCurrency::find(1))->withArgs([1]);
|
||||
$currencyRepos->shouldReceive('findNull')->once()->andReturn($this->getEuro())->withArgs([1]);
|
||||
$currencyRepos->shouldReceive('findNull')->once()->andReturn(TransactionCurrency::find(2))->withArgs([2]);
|
||||
|
||||
$repository->shouldReceive('getBillsPaidInRangePerCurrency')->once()->andReturn($amounts);
|
||||
|
||||
@@ -164,7 +164,7 @@ class CategoryControllerTest extends TestCase
|
||||
$repository->shouldReceive('spentInPeriodPerCurrency')->times(2)->andReturn($spentData);
|
||||
$repository->shouldReceive('spentInPeriodPcWoCategory')->once()->andReturn($spentNoCategory);
|
||||
|
||||
$currencyRepos->shouldReceive('findNull')->withArgs([1])->once()->andReturn(TransactionCurrency::find(1));
|
||||
$currencyRepos->shouldReceive('findNull')->withArgs([1])->once()->andReturn($this->getEuro());
|
||||
$generator->shouldReceive('multiSet')->andReturn([]);
|
||||
|
||||
$this->be($this->user());
|
||||
|
||||
Reference in New Issue
Block a user