Code Duplication    Length = 18-18 lines in 2 locations

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

@@ 148-165 (lines=18) @@
145
    /**
146
     * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException
147
     */
148
    public function testInvalidFieldIdentifierRange()
149
    {
150
        $repository = $this->getRepository();
151
        $searchService = $repository->getSearchService();
152
153
        $searchService->findLocations(
154
            new LocationQuery(
155
                array(
156
                    'filter' => new Criterion\Field(
157
                        'some_hopefully_unknown_field',
158
                        Criterion\Operator::BETWEEN,
159
                        array(10, 1000)
160
                    ),
161
                    'sortClauses' => array(new SortClause\ContentId()),
162
                )
163
            )
164
        );
165
    }
166
167
    /**
168
     * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException

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

@@ 1240-1257 (lines=18) @@
1237
     * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException
1238
     * @expectedExceptionMessage Argument '$criterion->target' is invalid: No searchable fields found for the given criterion target 'some_hopefully_unknown_field'
1239
     */
1240
    public function testInvalidFieldIdentifierRange()
1241
    {
1242
        $repository = $this->getRepository();
1243
        $searchService = $repository->getSearchService();
1244
1245
        $searchService->findContent(
1246
            new Query(
1247
                array(
1248
                    'filter' => new Criterion\Field(
1249
                        'some_hopefully_unknown_field',
1250
                        Criterion\Operator::BETWEEN,
1251
                        array(10, 1000)
1252
                    ),
1253
                    'sortClauses' => array(new SortClause\ContentId()),
1254
                )
1255
            )
1256
        );
1257
    }
1258
1259
    /**
1260
     * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException