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

@ -12,12 +12,9 @@ use Illuminate\Support\Str;
use Mockery\MockInterface;
use RuntimeException;
use Tests\TestCase;
use Tests\Uploads\UsesImages;
class UserManagementTest extends TestCase
{
use UsesImages;
public function test_user_creation()
{
/** @var User $user */
@ -282,7 +279,7 @@ class UserManagementTest extends TestCase
public function test_user_avatar_update_and_reset()
{
$user = $this->users->viewer();
$avatarFile = $this->getTestImage('avatar-icon.png');
$avatarFile = $this->files->uploadedImage('avatar-icon.png');
$this->assertEquals(0, $user->image_id);