. */ declare(strict_types=1); namespace Tests\Feature\Controllers\Transaction; use DB; use FireflyIII\Models\TransactionJournal; use FireflyIII\Repositories\Budget\BudgetRepositoryInterface; use FireflyIII\Repositories\Journal\JournalRepositoryInterface; use Illuminate\Support\Collection; use Mockery; use Tests\TestCase; /** * Class BulkControllerTest * * @SuppressWarnings(PHPMD.TooManyPublicMethods) * @SuppressWarnings(PHPMD.ExcessiveMethodLength) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class BulkControllerTest extends TestCase { /** * @covers \FireflyIII\Http\Controllers\Transaction\BulkController::edit * @covers \FireflyIII\Http\Controllers\Transaction\BulkController::__construct */ public function testEdit() { // mock stuff: $budgetRepos = $this->mock(BudgetRepositoryInterface::class); $budgetRepos->shouldReceive('getActiveBudgets')->andReturn(new Collection); $transfers = TransactionJournal::where('transaction_type_id', 3)->where('user_id', $this->user()->id)->take(4)->get()->pluck('id')->toArray(); $this->be($this->user()); $response = $this->get(route('transactions.bulk.edit', $transfers)); $response->assertStatus(200); $response->assertSee('Bulk edit a number of transactions'); // has bread crumb $response->assertSee('