Fixed coverage.

This commit is contained in:
James Cole
2015-05-02 23:28:04 +02:00
parent c8183aea51
commit 06c6d6096f
2 changed files with 5 additions and 6 deletions

View File

@@ -1,5 +1,6 @@
<?php
use Carbon\Carbon;
use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Support\Collection;
use League\FactoryMuffin\Facade as FactoryMuffin;
@@ -156,9 +157,11 @@ class BudgetControllerTest extends TestCase
$repository = $this->mock('FireflyIII\Repositories\Budget\BudgetRepositoryInterface');
$this->be($budget->user);
$paginator = new LengthAwarePaginator(new Collection, 0, 20, 1);
Amount::shouldReceive('getCurrencyCode')->andReturn('x');
Amount::shouldReceive('format')->andReturn('x');
$repository->shouldReceive('getJournals')->andReturn(new Collection);
$repository->shouldReceive('getJournals')->andReturn($paginator);
$repository->shouldReceive('getBudgetLimits')->andReturn(new Collection);
@@ -309,7 +312,6 @@ class BudgetControllerTest extends TestCase
Amount::shouldReceive('getCurrencySymbol')->andReturn('X');
$this->call('GET', '/budgets/income');
$this->assertResponseOk();
$this->assertViewHas('amount');