Code Duplication    Length = 16-16 lines in 2 locations

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

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

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

@@ 338-353 (lines=16) @@
335
     *
336
     * @return string The copied content type href
337
     */
338
    public function testCopyContentType($sourceContentTypeHref)
339
    {
340
        $response = $this->sendHttpRequest(
341
            $this->createHttpRequest('COPY', $sourceContentTypeHref, '', 'ContentType+json')
342
        );
343
344
        self::assertHttpResponseCodeEquals($response, 201);
345
        self::assertHttpResponseHasHeader($response, 'Location');
346
347
        $href = $response->getHeader('Location');
348
        $this->addCreatedElement($href);
349
350
        return $href;
351
352
        // @todo test identifier (copy_of_<sourceIdentifier)
353
    }
354
355
    /**
356
     * @covers POST /content/type/<contentTypeId>