| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | <?php |
||
| 34 | public function testUpdateNotificationSubject() |
||
| 35 | { |
||
| 36 | if (!class_exists('CommentNotifier')) { |
||
| 37 | $this->markTestSkipped('Comments Notification module is not installed'); |
||
| 38 | } |
||
| 39 | $blogPost = $this->objFromFixture('BlogPost', 'PostC'); |
||
| 40 | $comment = new Comment(); |
||
| 41 | $comment->Comment = 'This is a comment'; |
||
| 42 | $comment->write(); |
||
| 43 | $recipients = $blogPost->notificationRecipients( |
||
| 44 | $comment |
||
| 45 | )->toArray(); |
||
| 46 | $subject = $blogPost->notificationSubject($comment, $recipients[0]); |
||
| 47 | $this->assertEquals( |
||
| 48 | 'A new comment has been posted on Third Post', |
||
| 49 | $subject |
||
| 50 | ); |
||
| 51 | } |
||
| 52 | } |
||
| 53 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.