Fixed tests.

This commit is contained in:
James Cole
2014-07-08 08:07:15 +02:00
parent 5e8cfb512b
commit f6e195736f
5 changed files with 29 additions and 6 deletions

View File

@@ -29,6 +29,7 @@ class HomeControllerTest extends TestCase
// mock preferences helper:
$preferences = $this->mock('Firefly\Helper\Preferences\PreferencesHelperInterface');
$preferences->shouldReceive('get')->with('frontpageAccounts',[])->andReturn(new \Preference)->once();
$preferences->shouldReceive('get')->with('viewRange', 'week')->once()->andReturn('week');
// call
$this->call('GET', '/');
@@ -37,4 +38,8 @@ class HomeControllerTest extends TestCase
$this->assertResponseOk();
}
public function tearDown()
{
Mockery::close();
}
}