]> BookStack Code Mirror - bookstack/blobdiff - tests/OpenGraphTest.php
New translations activities.php (Portuguese)
[bookstack] / tests / OpenGraphTest.php
index 653f2e57e27e21d6b34af73de86f38d07d215c30..43389ad787ccc245a9b1d6d980f790c723a09038 100644 (file)
@@ -1,11 +1,13 @@
-<?php namespace Tests;
+<?php
+
+namespace Tests;
 
 use BookStack\Entities\Models\Book;
 use BookStack\Entities\Models\Bookshelf;
 use BookStack\Entities\Models\Chapter;
 use BookStack\Entities\Models\Page;
+use BookStack\Entities\Repos\BaseRepo;
 use BookStack\Entities\Repos\BookRepo;
-use BookStack\Entities\Repos\BookshelfRepo;
 use Illuminate\Support\Str;
 use Tests\Uploads\UsesImages;
 
@@ -67,8 +69,8 @@ class OpenGraphTest extends TestCase
         $this->assertArrayNotHasKey('image', $tags);
 
         // Test image set if image has cover image
-        $shelfRepo = app(BookshelfRepo::class);
-        $shelfRepo->updateCoverImage($shelf, $this->getTestImage('image.png'));
+        $baseRepo = app(BaseRepo::class);
+        $baseRepo->updateCoverImage($shelf, $this->getTestImage('image.png'));
         $resp = $this->asEditor()->get($shelf->getUrl());
         $tags = $this->getOpenGraphTags($resp);
 
@@ -97,6 +99,4 @@ class OpenGraphTest extends TestCase
 
         return $tags;
     }
-
-
-}
\ No newline at end of file
+}