mock(JournalRepositoryInterface::class); $collector = $this->mock(JournalCollectorInterface::class); $repository->shouldReceive('first')->times(2)->andReturn(new TransactionJournal); $collector->shouldReceive('setTypes')->andReturnSelf(); $collector->shouldReceive('setLimit')->andReturnSelf(); $collector->shouldReceive('setPage')->andReturnSelf(); $collector->shouldReceive('setAllAssetAccounts')->andReturnSelf(); $collector->shouldReceive('setRange')->andReturnSelf(); $collector->shouldReceive('withBudgetInformation')->andReturnSelf(); $collector->shouldReceive('withCategoryInformation')->andReturnSelf(); $collector->shouldReceive('withOpposingAccount')->andReturnSelf(); $collector->shouldReceive('disableInternalFilter')->andReturnSelf(); $collector->shouldReceive('getPaginatedJournals')->andReturn(new LengthAwarePaginator([], 0, 10)); $collector->shouldReceive('getJournals')->andReturn(new Collection); $this->be($this->user()); $response = $this->get(route('transactions.index', ['transfer'])); $response->assertStatus(200); // has bread crumb $response->assertSee('