mock(BudgetRepositoryInterface::class); $journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $repository->shouldReceive('updateLimitAmount')->andReturn(new BudgetLimit); $data = ['amount' => 200,]; $this->be($this->user()); $response = $this->post(route('budgets.amount', [1]), $data); $response->assertStatus(200); } /** * @covers \FireflyIII\Http\Controllers\BudgetController::create */ public function testCreate() { // mock stuff $journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $this->be($this->user()); $response = $this->get(route('budgets.create')); $response->assertStatus(200); // has bread crumb $response->assertSee('