Update tests so repositories are not called. Saves on DB calls, speeds up tests.

This commit is contained in:
James Cole
2018-09-04 16:47:01 +02:00
parent ca04113aa7
commit d43fa3790d
23 changed files with 376 additions and 65 deletions

View File

@@ -59,6 +59,7 @@ class ChooseLoginHandlerTest extends TestCase
*/
public function testCCFalse(): void
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'slh-A' . random_int(1, 10000);
@@ -205,6 +206,8 @@ class ChooseLoginHandlerTest extends TestCase
*/
public function testGetNextData(): void
{
$repository = $this->mock(ImportJobRepositoryInterface::class);
$repository->shouldReceive('setUser')->once();
// fake login:
$holder = new Holder([]);
$attempt = new Attempt(