Refactored a lot of tests.

This commit is contained in:
James Cole
2019-07-21 17:15:06 +02:00
parent 5242c0368b
commit b7a4b0fdfd
58 changed files with 1847 additions and 1564 deletions

View File

@@ -50,11 +50,11 @@ class SearchControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\SearchController
* @covers \FireflyIII\Http\Controllers\SearchController
*/
public function testIndex(): void
{
$this->mockDefaultSession();
$search = $this->mock(SearchInterface::class);
$userRepos = $this->mock(UserRepositoryInterface::class);
@@ -70,13 +70,12 @@ class SearchControllerTest extends TestCase
}
/**
* @covers \FireflyIII\Http\Controllers\SearchController
* @covers \FireflyIII\Http\Controllers\SearchController
*/
public function testSearch(): void
{
$this->mockDefaultSession();
$search = $this->mock(SearchInterface::class);
$userRepos = $this->mock(UserRepositoryInterface::class);
$search->shouldReceive('parseQuery')->once();
$search->shouldReceive('setLimit')->withArgs([50])->once();