. */ declare(strict_types=1); namespace Tests\Feature\Controllers; use Carbon\Carbon; use FireflyIII\Helpers\Attachments\AttachmentHelperInterface; use FireflyIII\Helpers\Collector\JournalCollectorInterface; use FireflyIII\Models\Bill; use FireflyIII\Models\TransactionJournal; use FireflyIII\Repositories\Bill\BillRepositoryInterface; use FireflyIII\Repositories\Journal\JournalRepositoryInterface; use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Support\Collection; use Illuminate\Support\MessageBag; use Tests\TestCase; /** * Class BillControllerTest * * @SuppressWarnings(PHPMD.TooManyPublicMethods) * @SuppressWarnings(PHPMD.ExcessiveMethodLength) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class BillControllerTest extends TestCase { /** * @covers \FireflyIII\Http\Controllers\BillController::create */ public function testCreate() { // mock stuff $attachHelper = $this->mock(AttachmentHelperInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $this->be($this->user()); $response = $this->get(route('bills.create')); $response->assertStatus(200); // has bread crumb $response->assertSee('