]> BookStack Code Mirror - bookstack/blobdiff - tests/Entity/BookTest.php
Extracted test file handling to its own class
[bookstack] / tests / Entity / BookTest.php
index f124a1690e4fae57f554a35ff74349ee93a80c0c..833cabaae93c112d95e27dc516ccc0d9c2744f36 100644 (file)
@@ -7,12 +7,9 @@ use BookStack\Entities\Models\BookChild;
 use BookStack\Entities\Models\Bookshelf;
 use BookStack\Entities\Repos\BookRepo;
 use Tests\TestCase;
-use Tests\Uploads\UsesImages;
 
 class BookTest extends TestCase
 {
-    use UsesImages;
-
     public function test_create()
     {
         $book = Book::factory()->make([
@@ -333,7 +330,7 @@ class BookTest extends TestCase
     {
         $book = $this->entities->book();
         $bookRepo = $this->app->make(BookRepo::class);
-        $coverImageFile = $this->getTestImage('cover.png');
+        $coverImageFile = $this->files->uploadedImage('cover.png');
         $bookRepo->updateCoverImage($book, $coverImageFile);
 
         $this->asEditor()->post($book->getUrl('/copy'), ['name' => 'My copy book']);