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

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