Fixed some tests so they will not be skipped.

This commit is contained in:
James Cole
2016-01-23 06:54:29 +01:00
parent 049d866f62
commit bf9c1c1875
2 changed files with 44 additions and 17 deletions

View File

@@ -62,8 +62,13 @@ class ChartBudgetControllerTest extends TestCase
public function testMultiYear()
{
$budget = new Budget;
$budget->id = 1;
$budget->dateFormatted = '2015';
$budget->budgeted = 120;
$repository = Mockery::mock('FireflyIII\Repositories\Budget\BudgetRepositoryInterface');
$repository->shouldReceive('getBudgetedPerYear')->once()->andReturn(new Collection);
$repository->shouldReceive('getBudgetedPerYear')->once()->andReturn(new Collection([$budget]));
$repository->shouldReceive('getBudgetsAndExpensesPerYear')->once()->andReturn([]);
$this->app->instance('FireflyIII\Repositories\Budget\BudgetRepositoryInterface', $repository);