1 | <?php |
||
3 | namespace SilverStripe\Blog\Tests; |
||
4 | |||
5 | use SilverStripe\Blog\Model\BlogPost; |
||
6 | use SilverStripe\Dev\SapphireTest; |
||
7 | |||
8 | class BlogPostNotificationsTest extends SapphireTest |
||
9 | { |
||
10 | /** |
||
11 | * {@inheritDoc} |
||
12 | * @var string |
||
13 | */ |
||
14 | protected static $fixture_file = 'blog.yml'; |
||
15 | |||
16 | public function testUpdateNotificationRecipients() |
||
41 | |||
42 | public function testUpdateNotificationSubject() |
||
43 | { |
||
44 | if (!class_exists('CommentNotifier')) { |
||
45 | $this->markTestSkipped('Comments Notification module is not installed'); |
||
46 | } |
||
47 | $blogPost = $this->objFromFixture(BlogPost::class, 'PostC'); |
||
48 | $comment = new SilverStripe\Comments\Model\Comment(); |
||
49 | $comment->Comment = 'This is a comment'; |
||
50 | $comment->write(); |
||
51 | $recipients = $blogPost->notificationRecipients( |
||
52 | $comment |
||
53 | )->toArray(); |
||
61 |