Code Duplication    Length = 17-18 lines in 2 locations

eZ/Publish/API/Repository/Tests/SearchEngineIndexingTest.php 2 locations

@@ 1044-1061 (lines=18) @@
1041
     *
1042
     * @depends testFindContentInfoFullTextIsSearchable
1043
     */
1044
    public function testFindContentInfoFullTextIsNotSearchable()
1045
    {
1046
        $searchTerm = 'pamplemousse';
1047
        $this->createFullTextIsSearchableContent($searchTerm, false);
1048
1049
        $repository = $this->getRepository();
1050
        $searchService = $repository->getSearchService();
1051
1052
        $query = new Query(
1053
            [
1054
                'query' => new Criterion\FullText($searchTerm),
1055
            ]
1056
        );
1057
1058
        $searchResult = $searchService->findContentInfo($query);
1059
1060
        $this->assertEquals(0, $searchResult->totalCount);
1061
    }
1062
1063
    /**
1064
     * Test that indexing full text data depends on the isSearchable flag on the field definition.
@@ 1068-1084 (lines=17) @@
1065
     *
1066
     * @depends testFindLocationsFullTextIsSearchable
1067
     */
1068
    public function testFindLocationsFullTextIsNotSearchable()
1069
    {
1070
        $searchTerm = 'pamplemousse';
1071
1072
        $repository = $this->getRepository(false);
1073
        $searchService = $repository->getSearchService();
1074
1075
        $query = new LocationQuery(
1076
            [
1077
                'query' => new Criterion\FullText($searchTerm),
1078
            ]
1079
        );
1080
1081
        $searchResult = $searchService->findLocations($query);
1082
1083
        $this->assertEquals(0, $searchResult->totalCount);
1084
    }
1085
1086
    /**
1087
     * Creates Content for testing full text search depending on the isSearchable flag.