1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Updated failing tests, Applied StyleCI changes

This commit is contained in:
Dan Brown
2021-12-18 16:41:42 +00:00
parent bb9cd9d610
commit 67b6c07548
4 changed files with 11 additions and 10 deletions

View File

@ -34,7 +34,7 @@ class TestEmailTest extends TestCase
$this->app[Dispatcher::class] = $mockDispatcher;
$exception = new \Exception('A random error occurred when testing an email');
$mockDispatcher->shouldReceive('send')->andThrow($exception);
$mockDispatcher->shouldReceive('sendNow')->andThrow($exception);
$admin = $this->getAdmin();
$sendReq = $this->actingAs($admin)->post('/settings/maintenance/send-test-email');

View File

@ -11,16 +11,16 @@ class AvatarTest extends TestCase
{
use UsesImages;
protected function createUserRequest($user)
protected function createUserRequest($user): User
{
$this->asAdmin()->post('/settings/users/create', [
'name' => $user->name,
'email' => $user->email,
'password' => 'testing',
'password-confirm' => 'testing',
'password' => 'testing101',
'password-confirm' => 'testing101',
]);
return User::where('email', '=', $user->email)->first();
return User::query()->where('email', '=', $user->email)->first();
}
protected function assertImageFetchFrom(string $url)