Code Duplication    Length = 14-20 lines in 5 locations

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

@@ 636-649 (lines=14) @@
633
        );
634
    }
635
636
    public function testContentTypeIdFilter()
637
    {
638
        $this->assertSearchResults(
639
            array(10, 14, 226),
640
            $this->getContentSearchHandler()->findContent(
641
                new Query(
642
                    array(
643
                        'filter' => new Criterion\ContentTypeId(4),
644
                        'limit' => 10,
645
                    )
646
                )
647
            )
648
        );
649
    }
650
651
    public function testContentTypeIdentifierFilter()
652
    {
@@ 1024-1037 (lines=14) @@
1021
        );
1022
    }
1023
1024
    public function testFullTextFilter()
1025
    {
1026
        $this->assertSearchResults(
1027
            array(191),
1028
            $this->getContentSearchHandler()->findContent(
1029
                new Query(
1030
                    array(
1031
                        'filter' => new Criterion\FullText('applied webpage'),
1032
                        'limit' => 10,
1033
                    )
1034
                )
1035
            )
1036
        );
1037
    }
1038
1039
    public function testFullTextWildcardFilter()
1040
    {
@@ 1039-1052 (lines=14) @@
1036
        );
1037
    }
1038
1039
    public function testFullTextWildcardFilter()
1040
    {
1041
        $this->assertSearchResults(
1042
            array(191),
1043
            $this->getContentSearchHandler()->findContent(
1044
                new Query(
1045
                    array(
1046
                        'filter' => new Criterion\FullText('applie*'),
1047
                        'limit' => 10,
1048
                    )
1049
                )
1050
            )
1051
        );
1052
    }
1053
1054
    public function testFullTextDisabledWildcardFilter()
1055
    {
@@ 1054-1069 (lines=16) @@
1051
        );
1052
    }
1053
1054
    public function testFullTextDisabledWildcardFilter()
1055
    {
1056
        $this->assertSearchResults(
1057
            array(),
1058
            $this->getContentSearchHandler(
1059
                array('enableWildcards' => false)
1060
            )->findContent(
1061
                new Query(
1062
                    array(
1063
                        'filter' => new Criterion\FullText('applie*'),
1064
                        'limit' => 10,
1065
                    )
1066
                )
1067
            )
1068
        );
1069
    }
1070
1071
    public function testFullTextFilterStopwordRemoval()
1072
    {
@@ 1071-1090 (lines=20) @@
1068
        );
1069
    }
1070
1071
    public function testFullTextFilterStopwordRemoval()
1072
    {
1073
        $handler = $this->getContentSearchHandler(
1074
            array(
1075
                'stopWordThresholdFactor' => 0.1,
1076
            )
1077
        );
1078
1079
        $this->assertSearchResults(
1080
            array(),
1081
            $handler->findContent(
1082
                new Query(
1083
                    array(
1084
                        'filter' => new Criterion\FullText('the'),
1085
                        'limit' => 10,
1086
                    )
1087
                )
1088
            )
1089
        );
1090
    }
1091
1092
    public function testFullTextFilterNoStopwordRemoval()
1093
    {