]> BookStack Code Mirror - bookstack/blobdiff - tests/References/CrossLinkParserTest.php
ZIP Imports: Added API examples, finished testing
[bookstack] / tests / References / CrossLinkParserTest.php
index 43b8a36ae3732e7b7c75faeeee0a86dbe17b2fc8..65eed9e70fc2a168b8e799e1492203ddfc98fd89 100644 (file)
@@ -2,7 +2,6 @@
 
 namespace Tests\References;
 
-use BookStack\Entities\Models\Page;
 use BookStack\References\CrossLinkParser;
 use Tests\TestCase;
 
@@ -11,7 +10,7 @@ class CrossLinkParserTest extends TestCase
     public function test_instance_with_entity_resolvers_matches_entity_links()
     {
         $entities = $this->entities->all();
-        $otherPage = Page::query()->where('id', '!=', $entities['page']->id)->first();
+        $otherPage = $this->entities->page();
 
         $html = '
 <a href="' . url('/link/' . $otherPage->id) . '#cat">Page Permalink</a>
@@ -40,7 +39,7 @@ class CrossLinkParserTest extends TestCase
 
     public function test_similar_page_and_book_reference_links_dont_conflict()
     {
-        $page = Page::query()->first();
+        $page = $this->entities->page();
         $book = $page->book;
 
         $html = '