Code Duplication    Length = 14-16 lines in 6 locations

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

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

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

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