Fixed tests.

This commit is contained in:
James Cole 2014-07-21 17:31:41 +02:00
parent 61438bf5f1
commit 9d142aa8b0

View File

@ -89,6 +89,9 @@ class ChartControllerTest extends TestCase
$start = new \Carbon\Carbon;
$end = new \Carbon\Carbon;
// mock preferences & pref:
$pref = $this->mock('Preference');
$pref->shouldReceive('getAttribute', 'data')->andReturn([]);
// mock toolkit
@ -96,8 +99,8 @@ class ChartControllerTest extends TestCase
$toolkit->shouldReceive('getDateRange')->andReturn([$start, $end]);
//
// // mock preference?
// $preferences = $this->mock('Firefly\Helper\Preferences\PreferencesHelperInterface');
// $preferences->shouldReceive('get')->with('viewRange', '1M')->once()->andReturn($pref);
$preferences = $this->mock('Firefly\Helper\Preferences\PreferencesHelperInterface');
$preferences->shouldReceive('get')->with('viewRange', '1M')->once()->andReturn($pref);
//
//
// // mock toolkit:
@ -111,7 +114,6 @@ class ChartControllerTest extends TestCase
////
// call
$this->call('GET', '/chart/home/categories');