Mock stuff in tests.

This commit is contained in:
James Cole
2016-02-06 09:52:31 +01:00
parent e56920edee
commit c9b56efaaa
3 changed files with 13 additions and 0 deletions

View File

@@ -6,6 +6,7 @@
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
use Illuminate\Pagination\LengthAwarePaginator;
/**
* Class AccountControllerTest
@@ -82,6 +83,9 @@ class AccountControllerTest extends TestCase
*/
public function testShow($range)
{
$repository = $this->mock('FireflyIII\Repositories\Account\AccountRepositoryInterface');
$repository->shouldReceive('getJournals')->once()->andReturn(new LengthAwarePaginator([], 0, 50));
$this->be($this->user());
$this->changeDateRange($this->user(), $range);
$this->call('GET', '/accounts/show/1');