Code Duplication    Length = 14-16 lines in 6 locations

eZ/Publish/Core/Search/Legacy/Tests/Content/HandlerContentTest.php 4 locations

@@ 614-629 (lines=16) @@
611
        );
612
    }
613
614
    public function testContentSubtreeFilterIn()
615
    {
616
        $this->assertSearchResults(
617
            array(67, 68, 69, 70, 71, 72, 73, 74),
618
            $this->getContentSearchHandler()->findContent(
619
                new Query(
620
                    array(
621
                        'filter' => new Criterion\Subtree(
622
                            array('/1/2/69/')
623
                        ),
624
                        'limit' => 10,
625
                    )
626
                )
627
            )
628
        );
629
    }
630
631
    public function testContentSubtreeFilterEq()
632
    {
@@ 631-644 (lines=14) @@
628
        );
629
    }
630
631
    public function testContentSubtreeFilterEq()
632
    {
633
        $this->assertSearchResults(
634
            array(67, 68, 69, 70, 71, 72, 73, 74),
635
            $this->getContentSearchHandler()->findContent(
636
                new Query(
637
                    array(
638
                        'filter' => new Criterion\Subtree('/1/2/69/'),
639
                        'limit' => 10,
640
                    )
641
                )
642
            )
643
        );
644
    }
645
646
    public function testContentTypeIdFilter()
647
    {
@@ 677-690 (lines=14) @@
674
        );
675
    }
676
677
    public function testContentTypeGroupFilter()
678
    {
679
        $this->assertSearchResults(
680
            array(4, 10, 11, 12, 13, 14, 42, 225, 226),
681
            $this->getContentSearchHandler()->findContent(
682
                new Query(
683
                    array(
684
                        'filter' => new Criterion\ContentTypeGroupId(2),
685
                        'limit' => 10,
686
                    )
687
                )
688
            )
689
        );
690
    }
691
692
    public function testDateMetadataFilterModifiedGreater()
693
    {
@@ 851-864 (lines=14) @@
848
        );
849
    }
850
851
    public function testSectionFilter()
852
    {
853
        $this->assertSearchResults(
854
            array(4, 10, 11, 12, 13, 14, 42, 226),
855
            $this->getContentSearchHandler()->findContent(
856
                new Query(
857
                    array(
858
                        'filter' => new Criterion\SectionId(array(2)),
859
                        'limit' => 10,
860
                    )
861
                )
862
            )
863
        );
864
    }
865
866
    public function testStatusFilter()
867
    {

eZ/Publish/Core/Search/Legacy/Tests/Content/HandlerLocationTest.php 2 locations

@@ 694-707 (lines=14) @@
691
        );
692
    }
693
694
    public function testContentTypeGroupFilter()
695
    {
696
        $this->assertSearchResults(
697
            array(5, 12, 13, 14, 15, 44, 45, 227, 228),
698
            $this->getContentSearchHandler()->findLocations(
699
                new LocationQuery(
700
                    array(
701
                        'filter' => new Criterion\ContentTypeGroupId(2),
702
                        'limit' => 10,
703
                    )
704
                )
705
            )
706
        );
707
    }
708
709
    public function testContentTypeIdFilter()
710
    {
@@ 789-802 (lines=14) @@
786
        );
787
    }
788
789
    public function testSectionFilter()
790
    {
791
        $this->assertSearchResults(
792
            array(5, 12, 13, 14, 15, 44, 45, 228),
793
            $this->getContentSearchHandler()->findLocations(
794
                new LocationQuery(
795
                    array(
796
                        'filter' => new Criterion\SectionId(array(2)),
797
                        'limit' => 10,
798
                    )
799
                )
800
            )
801
        );
802
    }
803
804
    public function testDateMetadataFilterModifiedGreater()
805
    {