X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/2f94f078e36cf65fa8c7b1d640c030b415714cdc..refs/pull/1756/head:/tests/Entity/EntityTest.php diff --git a/tests/Entity/EntityTest.php b/tests/Entity/EntityTest.php index c28ca8b3e..3d12ed749 100644 --- a/tests/Entity/EntityTest.php +++ b/tests/Entity/EntityTest.php @@ -4,7 +4,6 @@ use BookStack\Entities\Bookshelf; use BookStack\Entities\Book; use BookStack\Entities\Chapter; use BookStack\Entities\Page; -use BookStack\Entities\Repos\EntityRepo; use BookStack\Auth\UserRepo; use BookStack\Entities\Repos\PageRepo; use Carbon\Carbon; @@ -193,7 +192,7 @@ class EntityTest extends BrowserKitTest $entities = $this->createEntityChainBelongingToUser($creator, $updater); $this->actingAs($creator); app(UserRepo::class)->destroy($creator); - app(PageRepo::class)->savePageRevision($entities['page']); + app(PageRepo::class)->update($entities['page'], ['html' => '

hello!

>']); $this->checkEntitiesViewable($entities); } @@ -206,7 +205,7 @@ class EntityTest extends BrowserKitTest $entities = $this->createEntityChainBelongingToUser($creator, $updater); $this->actingAs($updater); app(UserRepo::class)->destroy($updater); - app(PageRepo::class)->savePageRevision($entities['page']); + app(PageRepo::class)->update($entities['page'], ['html' => '

Hello there!

']); $this->checkEntitiesViewable($entities); } @@ -274,8 +273,7 @@ class EntityTest extends BrowserKitTest public function test_slug_multi_byte_lower_casing() { - $entityRepo = app(EntityRepo::class); - $book = $entityRepo->createFromInput('book', [ + $book = $this->newBook([ 'name' => 'КНИГА' ]); @@ -285,8 +283,7 @@ class EntityTest extends BrowserKitTest public function test_slug_format() { - $entityRepo = app(EntityRepo::class); - $book = $entityRepo->createFromInput('book', [ + $book = $this->newBook([ 'name' => 'PartA / PartB / PartC' ]);