Code Duplication    Length = 19-19 lines in 2 locations

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

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

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

@@ 1198-1216 (lines=19) @@
1195
     * @see \eZ\Publish\API\Repository\SearchService::findContent()
1196
     * @depends eZ\Publish\API\Repository\Tests\SearchServiceTest::testFieldCollectionContains
1197
     */
1198
    public function testFieldCollectionContainsNoMatch()
1199
    {
1200
        $this->createMultipleCountriesContent();
1201
        $query = new Query(
1202
            array(
1203
                'query' => new Criterion\Field(
1204
                    'countries',
1205
                    Criterion\Operator::CONTAINS,
1206
                    'Netherlands Antilles'
1207
                ),
1208
            )
1209
        );
1210
1211
        $repository = $this->getRepository();
1212
        $searchService = $repository->getSearchService();
1213
        $result = $searchService->findContent($query);
1214
1215
        $this->assertEquals(0, $result->totalCount);
1216
    }
1217
1218
    /**
1219
     * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException