Code Duplication    Length = 17-18 lines in 2 locations

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

@@ 105-122 (lines=18) @@
102
     *
103
     * @depends testFindContentInfoFullTextIsSearchable
104
     */
105
    public function testFindContentInfoFullTextIsNotSearchable()
106
    {
107
        $searchTerm = 'pamplemousse';
108
        $this->createFullTextIsSearchableContent($searchTerm, false);
109
110
        $repository = $this->getRepository();
111
        $searchService = $repository->getSearchService();
112
113
        $query = new Query(
114
            [
115
                'query' => new Criterion\FullText($searchTerm),
116
            ]
117
        );
118
119
        $searchResult = $searchService->findContentInfo($query);
120
121
        $this->assertEquals(0, $searchResult->totalCount);
122
    }
123
124
    /**
125
     * Test that indexing full text data depends on the isSearchable flag on the field definition.
@@ 129-145 (lines=17) @@
126
     *
127
     * @depends testFindLocationsFullTextIsSearchable
128
     */
129
    public function testFindLocationsFullTextIsNotSearchable()
130
    {
131
        $searchTerm = 'pamplemousse';
132
133
        $repository = $this->getRepository(false);
134
        $searchService = $repository->getSearchService();
135
136
        $query = new LocationQuery(
137
            [
138
                'query' => new Criterion\FullText($searchTerm),
139
            ]
140
        );
141
142
        $searchResult = $searchService->findLocations($query);
143
144
        $this->assertEquals(0, $searchResult->totalCount);
145
    }
146
147
    /**
148
     * Creates Content for testing full text search depending on the isSearchable flag.