]> BookStack Code Mirror - bookstack/blobdiff - tests/Entity/CommentDisplayTest.php
Merge pull request #5917 from BookStackApp/copy_references
[bookstack] / tests / Entity / CommentDisplayTest.php
index bffe29fa95bb59c087ff4904ce023d4233994857..80664890a7e6e2df10733998f2a36172ced0f190 100644 (file)
@@ -72,8 +72,8 @@ class CommentDisplayTest extends TestCase
 
         Comment::factory()->create([
             'created_by'  => $editor->id,
-            'entity_type' => 'page',
-            'entity_id'   => $page->id,
+            'commentable_type' => 'page',
+            'commentable_id'   => $page->id,
         ]);
 
         $resp = $this->actingAs($editor)->get($page->getUrl());
@@ -84,7 +84,7 @@ class CommentDisplayTest extends TestCase
     public function test_comment_displays_relative_times()
     {
         $page = $this->entities->page();
-        $comment = Comment::factory()->create(['entity_id' => $page->id, 'entity_type' => $page->getMorphClass()]);
+        $comment = Comment::factory()->create(['commentable_id' => $page->id, 'commentable_type' => $page->getMorphClass()]);
         $comment->created_at = now()->subWeek();
         $comment->updated_at = now()->subDay();
         $comment->save();