Skip to content

Firefly III: a personal finances manager

This should fix tests.

James Colecbde9cdae92b
diff --git a/app/Http/Controllers/HelpController.php b/app/Http/Controllers/HelpController.php
index 9dbc65a8e8..94d16bdcaa 100644
--- a/app/Http/Controllers/HelpController.php
+++ b/app/Http/Controllers/HelpController.php
@@ -73,7 +73,6 @@ class HelpController extends Controller
private function getHelpText(string $route, string $language): string
{
// get language and default variables.
-
$content = '<p>' . strval(trans('firefly.route_has_no_help')) . '</p>';
// if no such route, log error and return default text.
diff --git a/tests/Feature/Controllers/BillControllerTest.php b/tests/Feature/Controllers/BillControllerTest.php
index df33f3b1a2..10e29f1744 100644
--- a/tests/Feature/Controllers/BillControllerTest.php
+++ b/tests/Feature/Controllers/BillControllerTest.php
@@ -119,8 +119,8 @@ class BillControllerTest extends TestCase
$repository = $this->mock(BillRepositoryInterface::class);
$repository->shouldReceive('getBills')->andReturn(new Collection([$bill]));
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
- $repository->shouldReceive('getPaidDatesInRange')->once()->andReturn(new Collection([1, 2, 3]));
- $repository->shouldReceive('getPayDatesInRange')->once()->andReturn(new Collection([1, 2]));
+ $repository->shouldReceive('getPaidDatesInRange')->twice()->andReturn(new Collection([new Carbon, new Carbon, new Carbon]));
+ $repository->shouldReceive('getPayDatesInRange')->once()->andReturn(new Collection([new Carbon, new Carbon]));
$repository->shouldReceive('nextExpectedMatch')->andReturn(new Carbon);
$this->be($this->user());
@@ -185,6 +185,8 @@ class BillControllerTest extends TestCase
$collector->shouldReceive('withBudgetInformation')->andReturnSelf();
$collector->shouldReceive('withCategoryInformation')->andReturnSelf();
$collector->shouldReceive('getPaginatedJournals')->andReturn(new LengthAwarePaginator([], 0, 10));
+ $repository->shouldReceive('getPaidDatesInRange')->twice()->andReturn(new Collection([new Carbon, new Carbon, new Carbon]));
+ $repository->shouldReceive('getPayDatesInRange')->once()->andReturn(new Collection([new Carbon, new Carbon, new Carbon]));
$this->be($this->user());
$response = $this->get(route('bills.show', [1]));