File tree Expand file tree Collapse file tree 4 files changed +6
-11
lines changed
database/factories/Activity/Models Expand file tree Collapse file tree 4 files changed +6
-11
lines changed Original file line number Diff line number Diff line change 1111
1212/**
1313 * @property int $id
14- * @property string $text
14+ * @property string $text - Deprecated & now unused (#4821)
1515 * @property string $html
1616 * @property int|null $parent_id - Relates to local_id, not id
1717 * @property int $local_id
@@ -25,7 +25,7 @@ class Comment extends Model implements Loggable
2525 use HasFactory;
2626 use HasCreatorAndUpdater;
2727
28- protected $ fillable = ['text ' , ' parent_id ' ];
28+ protected $ fillable = ['parent_id ' ];
2929 protected $ appends = ['created ' , 'updated ' ];
3030
3131 /**
Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ public function definition()
2525
2626 return [
2727 'html ' => $ html ,
28- 'text ' => $ text ,
2928 'parent_id ' => null ,
3029 'local_id ' => 1 ,
3130 ];
Original file line number Diff line number Diff line change @@ -18,10 +18,10 @@ public function test_add_comment()
1818 $ resp = $ this ->postJson ("/comment/ $ page ->id " , $ comment ->getAttributes ());
1919
2020 $ resp ->assertStatus (200 );
21- $ resp ->assertSee ($ comment ->text );
21+ $ resp ->assertSee ($ comment ->html , false );
2222
2323 $ pageResp = $ this ->get ($ page ->getUrl ());
24- $ pageResp ->assertSee ($ comment ->text );
24+ $ pageResp ->assertSee ($ comment ->html , false );
2525
2626 $ this ->assertDatabaseHas ('comments ' , [
2727 'local_id ' => 1 ,
Original file line number Diff line number Diff line change @@ -738,16 +738,12 @@ public function test_comment_delete_all_permission()
738738
739739 private function addComment (Page $ page ): TestResponse
740740 {
741- $ comment = Comment::factory ()->make ();
742-
743- return $ this ->postJson ("/comment/ $ page ->id " , $ comment ->only ('text ' , 'html ' ));
741+ return $ this ->postJson ("/comment/ $ page ->id " , ['html ' => '<p>New comment content</p> ' ]);
744742 }
745743
746744 private function updateComment (Comment $ comment ): TestResponse
747745 {
748- $ commentData = Comment::factory ()->make ();
749-
750- return $ this ->putJson ("/comment/ {$ comment ->id }" , $ commentData ->only ('text ' , 'html ' ));
746+ return $ this ->putJson ("/comment/ {$ comment ->id }" , ['html ' => '<p>Updated comment content</p> ' ]);
751747 }
752748
753749 private function deleteComment (Comment $ comment ): TestResponse
You can’t perform that action at this time.
0 commit comments