X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/919660678bec2b94eaa84ac60d0313f5ef07dfb7..refs/pull/1756/head:/tests/CommandsTest.php diff --git a/tests/CommandsTest.php b/tests/CommandsTest.php index 1533df792..4aef0ed26 100644 --- a/tests/CommandsTest.php +++ b/tests/CommandsTest.php @@ -2,8 +2,8 @@ use BookStack\Auth\Permissions\JointPermission; use BookStack\Entities\Page; -use BookStack\Entities\EntityRepo; use BookStack\Auth\User; +use BookStack\Entities\Repos\PageRepo; class CommandsTest extends TestCase { @@ -53,10 +53,10 @@ class CommandsTest extends TestCase public function test_clear_revisions_command() { $this->asEditor(); - $entityRepo = $this->app[EntityRepo::class]; + $pageRepo = app(PageRepo::class); $page = Page::first(); - $entityRepo->updatePage($page, $page->book_id, ['name' => 'updated page', 'html' => '
new content
', 'summary' => 'page revision testing']); - $entityRepo->updatePageDraft($page, ['name' => 'updated page', 'html' => 'new content in draft
', 'summary' => 'page revision testing']); + $pageRepo->update($page, ['name' => 'updated page', 'html' => 'new content
', 'summary' => 'page revision testing']); + $pageRepo->updatePageDraft($page, ['name' => 'updated page', 'html' => 'new content in draft
', 'summary' => 'page revision testing']); $this->assertDatabaseHas('page_revisions', [ 'page_id' => $page->id,