This should fix tests.

This commit is contained in:
James Cole 2017-12-06 19:41:51 +01:00
parent 343eb3a768
commit cbde9cdae9
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
2 changed files with 4 additions and 3 deletions

View File

@ -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.

View File

@ -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]));