Improve test coverage.

This commit is contained in:
James Cole
2019-08-29 17:53:25 +02:00
parent 91b6b86202
commit 19feefda2d
86 changed files with 3173 additions and 2626 deletions

View File

@@ -116,7 +116,8 @@ class ProfileControllerTest extends TestCase
$this->mock(UserRepositoryInterface::class);
Preferences::shouldReceive('findByName')->withArgs(['email_change_confirm_token'])->andReturn(new Collection());
// email_change_confirm_token
Log::warning('The following error is part of a test.');
$response = $this->get(route('profile.confirm-email-change', ['some-fake-token']));
$response->assertStatus(500);
}
@@ -583,6 +584,7 @@ class ProfileControllerTest extends TestCase
Preferences::shouldReceive('findByName')->once()->andReturn(new Collection([$tokenPreference]));
Preferences::shouldReceive('beginsWith')->once()->andReturn(new Collection([$hashPreference]));
Log::warning('The following error is part of a test.');
$response = $this->get(route('profile.undo-email-change', ['token', $hash]));
$response->assertStatus(500);
}