Optimize test code.

This commit is contained in:
James Cole
2015-04-07 18:52:15 +02:00
parent f10f5d30bf
commit 05670cf393
4 changed files with 30 additions and 33 deletions

View File

@@ -306,7 +306,7 @@ class GoogleChartControllerTest extends TestCase
// expect!
$repository->shouldReceive('incomeByPeriod')->andReturn($journals);
$repository->shouldReceive('journalsByExpenseAccount')->andReturn($journals);
Preferences::shouldReceive('get')->withArgs(['showSharedReports',false])->once()->andReturn($preference);
Preferences::shouldReceive('get')->withArgs(['showSharedReports', false])->once()->andReturn($preference);
$this->call('GET', '/chart/reports/income-expenses/2015');
@@ -329,7 +329,7 @@ class GoogleChartControllerTest extends TestCase
// expect!
$repository->shouldReceive('incomeByPeriod')->andReturn($journals);
$repository->shouldReceive('journalsByExpenseAccount')->andReturn($journals);
Preferences::shouldReceive('get')->withArgs(['showSharedReports',false])->once()->andReturn($preference);
Preferences::shouldReceive('get')->withArgs(['showSharedReports', false])->once()->andReturn($preference);
$this->call('GET', '/chart/reports/income-expenses-sum/2015');