1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-31 15:24:31 +03:00

Extracted test file handling to its own class

Closes #3995
This commit is contained in:
Dan Brown
2023-02-08 14:39:13 +00:00
parent 5d18e7df79
commit da1a66abd3
17 changed files with 293 additions and 309 deletions

View File

@ -9,8 +9,6 @@ use Tests\TestCase;
class AvatarTest extends TestCase
{
use UsesImages;
protected function createUserRequest($user): User
{
$this->asAdmin()->post('/settings/users/create', [
@ -29,12 +27,12 @@ class AvatarTest extends TestCase
$http->shouldReceive('fetch')
->once()->with($url)
->andReturn($this->getTestImageContent());
->andReturn($this->files->pngImageData());
}
protected function deleteUserImage(User $user)
{
$this->deleteImage($user->avatar->path);
$this->files->deleteAtRelativePath($user->avatar->path);
}
public function test_gravatar_fetched_on_user_create()