File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ public function __construct(?array $rawResponse = null)
3232 }
3333 }
3434
35- public static function create ($ content ): Comment
35+ public static function fromText ($ content ): Comment
3636 {
3737 $ commentEntity = new Comment ();
3838
Original file line number Diff line number Diff line change 9292 $ this ->expectExceptionMessage ('Insufficient permissions for this endpoint. ' );
9393 $ this ->expectExceptionCode (403 );
9494
95- \Notion::comments ()->onPage ('5c6a2821-6bb1-4a7e-b6e1-c50111515c3d ' )->create (Comment::create ('Hello world ' ));
95+ \Notion::comments ()->onPage ('5c6a2821-6bb1-4a7e-b6e1-c50111515c3d ' )->create (Comment::fromText ('Hello world ' ));
9696});
9797
9898it ('should throw correct exception if discussion is not found with discussion_id when creating a comment ' , function () {
109109 $ this ->expectExceptionMessage ('Could not find discussion with ID: 141216d8-bbc5-4c24-9d37-3c45d3bc15cc. ' );
110110 $ this ->expectExceptionCode (404 );
111111
112- \Notion::comments ()->onDiscussion ('141216d8-bbc5-4c24-9d37-3c45d3bc15cc ' )->create (Comment::create ('Hello world ' ));
112+ \Notion::comments ()->onDiscussion ('141216d8-bbc5-4c24-9d37-3c45d3bc15cc ' )->create (Comment::fromText ('Hello world ' ));
113113});
114114
115115it ('successfully creates a comment within a page ' , function () {
123123 ),
124124 ]);
125125
126- $ comment = \Notion::comments ()->onPage ('5c6a2821-6bb1-4a7e-b6e1-c50111515c3d ' )->create (Comment::create ('Hello world ' ));
126+ $ comment = \Notion::comments ()->onPage ('5c6a2821-6bb1-4a7e-b6e1-c50111515c3d ' )->create (Comment::fromText ('Hello world ' ));
127127
128128 expect ($ comment )->toBeInstanceOf (Comment::class);
129129 expect ($ comment ->getObjectType ())->toBe ('comment ' );
You can’t perform that action at this time.
0 commit comments