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

@@ 1112-1129 (lines=18) @@
1109
     * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException
1110
     * @expectedExceptionMessage Argument '$criterion->target' is invalid: No searchable fields found for the given criterion target 'some_hopefully_unknown_field'
1111
     */
1112
    public function testInvalidFieldIdentifierRange()
1113
    {
1114
        $repository = $this->getRepository();
1115
        $searchService = $repository->getSearchService();
1116
1117
        $searchService->findContent(
1118
            new Query(
1119
                array(
1120
                    'filter' => new Criterion\Field(
1121
                        'some_hopefully_unknown_field',
1122
                        Criterion\Operator::BETWEEN,
1123
                        array(10, 1000)
1124
                    ),
1125
                    'sortClauses' => array(new SortClause\ContentId()),
1126
                )
1127
            )
1128
        );
1129
    }
1130
1131
    /**
1132
     * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException