|
@@ 691-702 (lines=12) @@
|
| 688 |
|
$this->assertSame($item->ID, $parent->ID); |
| 689 |
|
} |
| 690 |
|
|
| 691 |
|
public function testGetParentTitle() |
| 692 |
|
{ |
| 693 |
|
$comment = $this->objFromFixture(Comment::class, 'firstComA'); |
| 694 |
|
$title = $comment->getParentTitle(); |
| 695 |
|
$this->assertEquals('First', $title); |
| 696 |
|
|
| 697 |
|
// Title from a comment with no parent is blank |
| 698 |
|
$comment->ParentID = 0; |
| 699 |
|
$comment->ParentClass = null; |
| 700 |
|
$comment->write(); |
| 701 |
|
$this->assertEquals('', $comment->getParentTitle()); |
| 702 |
|
} |
| 703 |
|
|
| 704 |
|
public function testGetParentClassName() |
| 705 |
|
{ |
|
@@ 904-912 (lines=9) @@
|
| 901 |
|
$this->assertTrue($comment->Moderated); |
| 902 |
|
} |
| 903 |
|
|
| 904 |
|
public function testSpamClass() |
| 905 |
|
{ |
| 906 |
|
$comment = $this->objFromFixture(Comment::class, 'firstComA'); |
| 907 |
|
$this->assertEquals('notspam', $comment->spamClass()); |
| 908 |
|
$comment->Moderated = false; |
| 909 |
|
$this->assertEquals('unmoderated', $comment->spamClass()); |
| 910 |
|
$comment->IsSpam = true; |
| 911 |
|
$this->assertEquals('spam', $comment->spamClass()); |
| 912 |
|
} |
| 913 |
|
|
| 914 |
|
public function testGetTitle() |
| 915 |
|
{ |