Code Duplication    Length = 18-18 lines in 2 locations

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

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

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

@@ 1224-1241 (lines=18) @@
1221
     * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException
1222
     * @expectedExceptionMessage Argument '$criterion->target' is invalid: No searchable fields found for the given criterion target 'some_hopefully_unknown_field'
1223
     */
1224
    public function testInvalidFieldIdentifierRange()
1225
    {
1226
        $repository = $this->getRepository();
1227
        $searchService = $repository->getSearchService();
1228
1229
        $searchService->findContent(
1230
            new Query(
1231
                array(
1232
                    'filter' => new Criterion\Field(
1233
                        'some_hopefully_unknown_field',
1234
                        Criterion\Operator::BETWEEN,
1235
                        array(10, 1000)
1236
                    ),
1237
                    'sortClauses' => array(new SortClause\ContentId()),
1238
                )
1239
            )
1240
        );
1241
    }
1242
1243
    /**
1244
     * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException