Code Duplication    Length = 9-12 lines in 2 locations

tests/CommentsTest.php 2 locations

@@ 661-672 (lines=12) @@
658
        $this->assertSame($item->ID, $parent->ID);
659
    }
660
661
    public function testGetParentTitle()
662
    {
663
        $comment = $this->objFromFixture(Comment::class, 'firstComA');
664
        $title = $comment->getParentTitle();
665
        $this->assertEquals('First', $title);
666
667
        // Title from a comment with no parent is blank
668
        $comment->ParentID = 0;
669
        $comment->ParentClass = null;
670
        $comment->write();
671
        $this->assertEquals('', $comment->getParentTitle());
672
    }
673
674
    public function testGetParentClassName()
675
    {
@@ 874-882 (lines=9) @@
871
        $this->assertTrue($comment->Moderated);
872
    }
873
874
    public function testSpamClass()
875
    {
876
        $comment = $this->objFromFixture(Comment::class, 'firstComA');
877
        $this->assertEquals('notspam', $comment->spamClass());
878
        $comment->Moderated = false;
879
        $this->assertEquals('unmoderated', $comment->spamClass());
880
        $comment->IsSpam = true;
881
        $this->assertEquals('spam', $comment->spamClass());
882
    }
883
884
    public function testGetTitle()
885
    {