Code Duplication    Length = 14-16 lines in 6 locations

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

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

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

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