From 3e919367dd3ce5330315998f027de69b416fe5c8 Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Thu, 21 May 2020 14:42:17 +0800 Subject: [PATCH] fix tests --- tests/HttpTest/ControllersTest/TextureControllerTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/HttpTest/ControllersTest/TextureControllerTest.php b/tests/HttpTest/ControllersTest/TextureControllerTest.php index 736dc5ad..c18e141e 100644 --- a/tests/HttpTest/ControllersTest/TextureControllerTest.php +++ b/tests/HttpTest/ControllersTest/TextureControllerTest.php @@ -116,7 +116,7 @@ class TextureControllerTest extends TestCase ->assertHeader('Content-Type', 'image/webp'); $texture = factory(Texture::class)->create(); - $disk->put($texture->hash, ''); + $disk->put($texture->hash, Image::canvas(1, 1)->encode('webp')); $player->tid_skin = $texture->tid; $player->save(); $image = $this->get('/avatar/player/'.$player->name) @@ -147,7 +147,7 @@ class TextureControllerTest extends TestCase ->assertHeader('Content-Type', 'image/webp'); $texture = factory(Texture::class)->create(); - $disk->put($texture->hash, ''); + $disk->put($texture->hash, Image::canvas(1, 1)->encode('webp')); $user->avatar = $texture->tid; $user->save(); $image = $this->get('/avatar/user/'.$user->uid) @@ -185,7 +185,7 @@ class TextureControllerTest extends TestCase $this->assertEquals(100, $image->width()); $this->assertEquals(100, $image->height()); - $disk->put($texture->hash, ''); + $disk->put($texture->hash, Image::canvas(1, 1)->encode('webp')); $image = $this->get('/avatar/'.$texture->tid) ->assertSuccessful() ->assertHeader('Content-Type', 'image/webp')