Code Duplication    Length = 14-16 lines in 6 locations

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

@@ 604-619 (lines=16) @@
601
        );
602
    }
603
604
    public function testContentSubtreeFilterIn()
605
    {
606
        $this->assertSearchResults(
607
            array(67, 68, 69, 70, 71, 72, 73, 74),
608
            $this->getContentSearchHandler()->findContent(
609
                new Query(
610
                    array(
611
                        'filter' => new Criterion\Subtree(
612
                            array('/1/2/69/')
613
                        ),
614
                        'limit' => 10,
615
                    )
616
                )
617
            )
618
        );
619
    }
620
621
    public function testContentSubtreeFilterEq()
622
    {
@@ 621-634 (lines=14) @@
618
        );
619
    }
620
621
    public function testContentSubtreeFilterEq()
622
    {
623
        $this->assertSearchResults(
624
            array(67, 68, 69, 70, 71, 72, 73, 74),
625
            $this->getContentSearchHandler()->findContent(
626
                new Query(
627
                    array(
628
                        'filter' => new Criterion\Subtree('/1/2/69/'),
629
                        'limit' => 10,
630
                    )
631
                )
632
            )
633
        );
634
    }
635
636
    public function testContentTypeIdFilter()
637
    {
@@ 667-680 (lines=14) @@
664
        );
665
    }
666
667
    public function testContentTypeGroupFilter()
668
    {
669
        $this->assertSearchResults(
670
            array(4, 10, 11, 12, 13, 14, 42, 225, 226),
671
            $this->getContentSearchHandler()->findContent(
672
                new Query(
673
                    array(
674
                        'filter' => new Criterion\ContentTypeGroupId(2),
675
                        'limit' => 10,
676
                    )
677
                )
678
            )
679
        );
680
    }
681
682
    public function testDateMetadataFilterModifiedGreater()
683
    {
@@ 841-854 (lines=14) @@
838
        );
839
    }
840
841
    public function testSectionFilter()
842
    {
843
        $this->assertSearchResults(
844
            array(4, 10, 11, 12, 13, 14, 42, 226),
845
            $this->getContentSearchHandler()->findContent(
846
                new Query(
847
                    array(
848
                        'filter' => new Criterion\SectionId(array(2)),
849
                        'limit' => 10,
850
                    )
851
                )
852
            )
853
        );
854
    }
855
856
    public function testStatusFilter()
857
    {

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

@@ 684-697 (lines=14) @@
681
        );
682
    }
683
684
    public function testContentTypeGroupFilter()
685
    {
686
        $this->assertSearchResults(
687
            array(5, 12, 13, 14, 15, 44, 45, 227, 228),
688
            $this->getContentSearchHandler()->findLocations(
689
                new LocationQuery(
690
                    array(
691
                        'filter' => new Criterion\ContentTypeGroupId(2),
692
                        'limit' => 10,
693
                    )
694
                )
695
            )
696
        );
697
    }
698
699
    public function testContentTypeIdFilter()
700
    {
@@ 779-792 (lines=14) @@
776
        );
777
    }
778
779
    public function testSectionFilter()
780
    {
781
        $this->assertSearchResults(
782
            array(5, 12, 13, 14, 15, 44, 45, 228),
783
            $this->getContentSearchHandler()->findLocations(
784
                new LocationQuery(
785
                    array(
786
                        'filter' => new Criterion\SectionId(array(2)),
787
                        'limit' => 10,
788
                    )
789
                )
790
            )
791
        );
792
    }
793
794
    public function testDateMetadataFilterModifiedGreater()
795
    {