be($this->user()); $withdrawal = TransactionJournal::where('transaction_type_id', 1)->whereNull('deleted_at')->where('user_id', $this->user()->id)->first(); $response = $this->get(route('transactions.clone', [$withdrawal->id])); $response->assertStatus(302); } /** * @covers \FireflyIII\Http\Controllers\Transaction\SingleController::create * @covers \FireflyIII\Http\Controllers\Transaction\SingleController::__construct */ public function testCreate() { Steam::shouldReceive('phpBytes')->andReturn(2048); $repository = $this->mock(AccountRepositoryInterface::class); $repository->shouldReceive('getActiveAccountsByType')->once()->withArgs([[AccountType::DEFAULT, AccountType::ASSET]])->andReturn(new Collection); $budgetRepos = $this->mock(BudgetRepositoryInterface::class); $budgetRepos->shouldReceive('getActiveBudgets')->andReturn(new Collection)->once(); $piggyRepos = $this->mock(PiggyBankRepositoryInterface::class); $piggyRepos->shouldReceive('getPiggyBanksWithAmount')->andReturn(new Collection)->once(); $this->be($this->user()); $response = $this->get(route('transactions.create', ['withdrawal'])); $response->assertStatus(200); // has bread crumb $response->assertSee('