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
            array(
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

@@ 1283-1301 (lines=19) @@
1280
     * @see \eZ\Publish\API\Repository\SearchService::findContent()
1281
     * @depends eZ\Publish\API\Repository\Tests\SearchServiceTest::testFieldCollectionContains
1282
     */
1283
    public function testFieldCollectionContainsNoMatch()
1284
    {
1285
        $this->createMultipleCountriesContent();
1286
        $query = new Query(
1287
            array(
1288
                'query' => new Criterion\Field(
1289
                    'countries',
1290
                    Criterion\Operator::CONTAINS,
1291
                    'Netherlands Antilles'
1292
                ),
1293
            )
1294
        );
1295
1296
        $repository = $this->getRepository();
1297
        $searchService = $repository->getSearchService();
1298
        $result = $searchService->findContent($query);
1299
1300
        $this->assertEquals(0, $result->totalCount);
1301
    }
1302
1303
    /**
1304
     * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException