Code Duplication    Length = 9-12 lines in 2 locations

tests/CommentsTest.php 2 locations

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