From 98645af9600af4cc89ffa987f9ef9091a98d0dac Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Tue, 17 Jan 2017 08:58:00 +1300 Subject: [PATCH] Implement Blog namespaces --- _config/comments.yml | 2 +- tests/BlogPostNotificationsTest.php | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) 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(