Code Duplication    Length = 9-9 lines in 3 locations

eZ/Bundle/EzPublishRestBundle/Tests/Functional/LocationTest.php 1 location

@@ 53-61 (lines=9) @@
50
     * @depends testCreateLocation
51
     * Covers GET /content/locations?remoteId=<locationRemoteId>
52
     */
53
    public function testRedirectLocationByRemoteId($locationHref)
54
    {
55
        $response = $this->sendHttpRequest(
56
            $this->createHttpRequest('GET', '/api/ezp/v2/content/locations?remoteId=' . $this->addTestSuffix('testCreateLocation'))
57
        );
58
59
        self::assertHttpResponseCodeEquals($response, 307);
60
        self::assertHttpResponseHasHeader($response, 'Location', $locationHref);
61
    }
62
63
    /**
64
     * @depends testCreateLocation

eZ/Bundle/EzPublishRestBundle/Tests/Functional/UserTest.php 2 locations

@@ 229-237 (lines=9) @@
226
     * @depends testCreateUser
227
     * Covers GET /user/users?remoteId={userRemoteId}
228
     */
229
    public function testLoadUserByRemoteId()
230
    {
231
        $remoteId = $this->addTestSuffix('testCreateUser');
232
        $response = $this->sendHttpRequest(
233
            $this->createHttpRequest('GET', "/api/ezp/v2/user/users?remoteId=$remoteId")
234
        );
235
236
        self::assertHttpResponseCodeEquals($response, 200);
237
    }
238
239
    /**
240
     * Covers GET /user/groups.
@@ 255-263 (lines=9) @@
252
     * @depends testCreateUserGroup
253
     * Covers GET /user/groups?remoteId={groupRemoteId}
254
     */
255
    public function testLoadUserGroupByRemoteId($groupHref)
256
    {
257
        $remoteId = $this->addTestSuffix('testCreateUserGroup');
258
        $response = $this->sendHttpRequest(
259
            $this->createHttpRequest('GET', "/api/ezp/v2/user/groups?remoteId=$remoteId")
260
        );
261
262
        self::assertHttpResponseCodeEquals($response, 200);
263
    }
264
265
    /**
266
     * Covers GET /user/users/{userId}/drafts.