Implement Blog namespaces

This commit is contained in:
Robbie Averill 2017-01-17 08:58:00 +13:00
parent 077929f8bf
commit 98645af960
2 changed files with 6 additions and 5 deletions

View File

@ -3,7 +3,7 @@ Name: blogcommentsconfig
Only:
moduleexists: comments
---
Comment:
SilverStripe\Comments\Model\Comment:
extensions:
- SilverStripe\Blog\Model\BlogCommentExtension

View File

@ -1,5 +1,6 @@
<?php
use SilverStripe\Blog\Model\BlogPost;
use SilverStripe\Dev\SapphireTest;
class BlogPostNotificationsTest extends SapphireTest
@ -16,8 +17,8 @@ class BlogPostNotificationsTest extends SapphireTest
$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 \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(