Code Duplication    Length = 16-16 lines in 2 locations

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

@@ 172-187 (lines=16) @@
169
     * @covers GET /content/objects/<contentId>/currentversion
170
     * @covers \eZ\Publish\Core\REST\Server\Controller\Content::redirectCurrentVersion
171
     */
172
    public function testRedirectCurrentVersion($restContentHref)
173
    {
174
        $response = $this->sendHttpRequest(
175
            $this->createHttpRequest('GET', "$restContentHref/currentversion")
176
        );
177
178
        self::assertHttpResponseCodeEquals($response, 307);
179
        self::assertHttpResponseHasHeader($response, 'Location', "$restContentHref/versions/1");
180
181
        $this->assertHttpResponseHasCacheTags(
182
            $response,
183
            [
184
                'content-' . $this->extractLastIdFromHref($restContentHref)
185
            ]
186
        );
187
    }
188
189
    /**
190
     * @depends testCreateDraftFromVersion

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

@@ 272-287 (lines=16) @@
269
     *
270
     * @return string The copied content type href
271
     */
272
    public function testCopyContentType($sourceContentTypeHref)
273
    {
274
        $response = $this->sendHttpRequest(
275
            $this->createHttpRequest('COPY', $sourceContentTypeHref, '', 'ContentType+json')
276
        );
277
278
        self::assertHttpResponseCodeEquals($response, 201);
279
        self::assertHttpResponseHasHeader($response, 'Location');
280
281
        $href = $response->getHeader('Location');
282
        $this->addCreatedElement($href);
283
284
        return $href;
285
286
        // @todo test identifier (copy_of_<sourceIdentifier)
287
    }
288
289
    /**
290
     * @covers POST /content/type/<contentTypeId>