diff --git a/_config/comments.yml b/_config/comments.yml index ab58e2d..9e7ece3 100644 --- a/_config/comments.yml +++ b/_config/comments.yml @@ -3,7 +3,7 @@ Name: blogcommentsconfig Only: moduleexists: comments --- -Comment: +SilverStripe\Comments\Model\Comment: extensions: - SilverStripe\Blog\Model\BlogCommentExtension diff --git a/tests/BlogPostNotificationsTest.php b/tests/BlogPostNotificationsTest.php index 417502b..2f0bcb6 100644 --- a/tests/BlogPostNotificationsTest.php +++ b/tests/BlogPostNotificationsTest.php @@ -1,5 +1,6 @@ markTestSkipped('Comments Notification module is not installed'); } - $blogPost = $this->objFromFixture('SilverStripe\\Blog\\Model\\BlogPost', 'PostC'); - $comment = new Comment(); + $blogPost = $this->objFromFixture(BlogPost::class, 'PostC'); + $comment = new \SilverStripe\Comments\Model\Comment(); $comment->Comment = 'This is a comment'; $comment->write(); $recipients = $blogPost->notificationRecipients( @@ -41,8 +42,8 @@ class BlogPostNotificationsTest extends SapphireTest if (!class_exists('CommentNotifier')) { $this->markTestSkipped('Comments Notification module is not installed'); } - $blogPost = $this->objFromFixture('SilverStripe\\Blog\\Model\\BlogPost', 'PostC'); - $comment = new Comment(); + $blogPost = $this->objFromFixture(BlogPost::class, 'PostC'); + $comment = new use SilverStripe\Comments\Model\Comment(); $comment->Comment = 'This is a comment'; $comment->write(); $recipients = $blogPost->notificationRecipients(