Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix tests
James Coleb6227e633cdb
diff --git a/tests/Feature/Controllers/BudgetControllerTest.php b/tests/Feature/Controllers/BudgetControllerTest.phpindex 06aa91b33d..24bb163aed 100644--- a/tests/Feature/Controllers/BudgetControllerTest.php+++ b/tests/Feature/Controllers/BudgetControllerTest.php@@ -44,7 +44,7 @@ class BudgetControllerTest extends TestCase$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);$repository->shouldReceive('updateLimitAmount')->andReturn(new BudgetLimit);- $data = ['amount' => 200,];+ $data = ['amount' => 200, 'start' => '2017-01-01', 'end' => '2017-01-31'];$this->be($this->user());$response = $this->post(route('budgets.amount', [1]), $data);$response->assertStatus(200);@@ -61,7 +61,7 @@ class BudgetControllerTest extends TestCase$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);$repository->shouldReceive('updateLimitAmount')->andReturn(new BudgetLimit);- $data = ['amount' => 0,];+ $data = ['amount' => 0, 'start' => '2017-01-01', 'end' => '2017-01-31'];$this->be($this->user());$response = $this->post(route('budgets.amount', [1]), $data);$response->assertStatus(200);@@ -542,7 +542,7 @@ class BudgetControllerTest extends TestCase$repository->shouldReceive('getAvailableBudget')->andReturn('1');$repository->shouldReceive('cleanupBudgets');- $response = $this->get(route('budgets.income', [1]));+ $response = $this->get(route('budgets.income', ['2017-01-01', '2017-01-31']));$response->assertStatus(200);}diff --git a/tests/Feature/Controllers/TagControllerTest.php b/tests/Feature/Controllers/TagControllerTest.phpindex 7e1c5c8e76..4846cd6136 100644--- a/tests/Feature/Controllers/TagControllerTest.php+++ b/tests/Feature/Controllers/TagControllerTest.php@@ -129,6 +129,9 @@ class TagControllerTest extends TestCase$repository->shouldReceive('firstUseDate')->andReturn(new Carbon)->once();$repository->shouldReceive('lastUseDate')->andReturn(new Carbon)->once();$repository->shouldReceive('earnedInPeriod')->andReturn('1')->once();+ $repository->shouldReceive('sumOfTag')->andReturn('1')->once();+ $repository->shouldReceive('resultOfTag')->andReturn('1')->once();+$collector->shouldReceive('removeFilter')->andReturnSelf()->once();@@ -161,6 +164,8 @@ class TagControllerTest extends TestCase$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);$repository->shouldReceive('firstUseDate')->andReturn(new Carbon)->once();+ $repository->shouldReceive('resultOfTag')->andReturn('1')->once();+$collector->shouldReceive('removeFilter')->andReturnSelf()->once();$repository->shouldReceive('sumOfTag')->andReturn('1')->once();$collector->shouldReceive('setAllAssetAccounts')->andReturnSelf()->once();@@ -195,6 +200,7 @@ class TagControllerTest extends TestCase$repository->shouldReceive('lastUseDate')->andReturn(new Carbon)->once();$repository->shouldReceive('earnedInPeriod')->andReturn('1')->once();$repository->shouldReceive('sumOfTag')->andReturn('1')->once();+ $repository->shouldReceive('resultOfTag')->andReturn('1')->once();$collector->shouldReceive('removeFilter')->andReturnSelf()->once();$collector->shouldReceive('setAllAssetAccounts')->andReturnSelf()->once();