Code Duplication    Length = 9-12 lines in 2 locations

tests/CommentsTest.php 2 locations

@@ 669-680 (lines=12) @@
666
        $this->assertSame($item->ID, $parent->ID);
667
    }
668
669
    public function testGetParentTitle()
670
    {
671
        $comment = $this->objFromFixture(Comment::class, 'firstComA');
672
        $title = $comment->getParentTitle();
673
        $this->assertEquals('First', $title);
674
675
        // Title from a comment with no parent is blank
676
        $comment->ParentID = 0;
677
        $comment->ParentClass = null;
678
        $comment->write();
679
        $this->assertEquals('', $comment->getParentTitle());
680
    }
681
682
    public function testGetParentClassName()
683
    {
@@ 882-890 (lines=9) @@
879
        $this->assertTrue($comment->Moderated);
880
    }
881
882
    public function testSpamClass()
883
    {
884
        $comment = $this->objFromFixture(Comment::class, 'firstComA');
885
        $this->assertEquals('notspam', $comment->spamClass());
886
        $comment->Moderated = false;
887
        $this->assertEquals('unmoderated', $comment->spamClass());
888
        $comment->IsSpam = true;
889
        $this->assertEquals('spam', $comment->spamClass());
890
    }
891
892
    public function testGetTitle()
893
    {