Code Duplication    Length = 19-19 lines in 2 locations

eZ/Publish/API/Repository/Tests/SearchServiceLocationTest.php 1 location

@@ 125-143 (lines=19) @@
122
     * @see \eZ\Publish\API\Repository\SearchService::findLocations()
123
     * @depends eZ\Publish\API\Repository\Tests\SearchServiceTest::testFieldCollectionContains
124
     */
125
    public function testFieldCollectionContainsNoMatch()
126
    {
127
        $this->createMultipleCountriesContent();
128
        $query = new LocationQuery(
129
            [
130
                'query' => new Criterion\Field(
131
                    'countries',
132
                    Criterion\Operator::CONTAINS,
133
                    'Netherlands Antilles'
134
                ),
135
            ]
136
        );
137
138
        $repository = $this->getRepository();
139
        $searchService = $repository->getSearchService();
140
        $result = $searchService->findLocations($query);
141
142
        $this->assertEquals(0, $result->totalCount);
143
    }
144
145
    /**
146
     * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException

eZ/Publish/API/Repository/Tests/SearchServiceTest.php 1 location

@@ 1214-1232 (lines=19) @@
1211
     * @see \eZ\Publish\API\Repository\SearchService::findContent()
1212
     * @depends eZ\Publish\API\Repository\Tests\SearchServiceTest::testFieldCollectionContains
1213
     */
1214
    public function testFieldCollectionContainsNoMatch()
1215
    {
1216
        $this->createMultipleCountriesContent();
1217
        $query = new Query(
1218
            [
1219
                'query' => new Criterion\Field(
1220
                    'countries',
1221
                    Criterion\Operator::CONTAINS,
1222
                    'Netherlands Antilles'
1223
                ),
1224
            ]
1225
        );
1226
1227
        $repository = $this->getRepository();
1228
        $searchService = $repository->getSearchService();
1229
        $result = $searchService->findContent($query);
1230
1231
        $this->assertEquals(0, $result->totalCount);
1232
    }
1233
1234
    /**
1235
     * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException