be($user); $words = ['Something']; // mock! $repository = $this->mock('FireflyIII\Support\Search\SearchInterface'); $repository->shouldReceive('searchTransactions')->with($words)->once()->andReturn([]); $repository->shouldReceive('searchAccounts')->with($words)->once()->andReturn([]); $repository->shouldReceive('searchCategories')->with($words)->once()->andReturn([]); $repository->shouldReceive('searchBudgets')->with($words)->once()->andReturn([]); $repository->shouldReceive('searchTags')->with($words)->once()->andReturn([]); $this->call('GET', '/search?q=Something'); $this->assertResponseOk(); } }