mock(JournalRepositoryInterface::class); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $this->be($this->user()); $response = $this->get(route('piggy-banks.add', [1])); $response->assertStatus(200); } /** * @covers \FireflyIII\Http\Controllers\PiggyBankController::addMobile */ public function testAddMobile() { // mock stuff $journalRepos = $this->mock(JournalRepositoryInterface::class); $journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal); $this->be($this->user()); $response = $this->get(route('piggy-banks.add-money-mobile', [1])); $response->assertStatus(200); $response->assertSee('