. */ declare(strict_types=1); namespace Tests\Feature\Controllers; use FireflyIII\Models\TransactionJournal; use FireflyIII\Repositories\Attachment\AttachmentRepositoryInterface; use FireflyIII\Repositories\Journal\JournalRepositoryInterface; use Tests\TestCase; /** * Class AttachmentControllerTest * * @SuppressWarnings(PHPMD.TooManyPublicMethods) * @SuppressWarnings(PHPMD.ExcessiveMethodLength) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class AttachmentControllerTest extends TestCase { /** * @covers \FireflyIII\Http\Controllers\AttachmentController::delete */ public function testDelete() { // mock stuff $journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $this->be($this->user()); $response = $this->get(route('attachments.delete', [1])); $response->assertStatus(200); // has bread crumb $response->assertSee('