public testCopyContent ( $restContentHref ) : string | ||
return | string | the copied content href |
public function testCopyContent($restContentHref)
{
$testContent = $this->loadContent($restContentHref);
$request = $this->createHttpRequest('COPY', $restContentHref);
$request->addHeader('Destination: ' . $testContent['MainLocation']['_href']);
$response = $this->sendHttpRequest($request);
self::assertHttpResponseCodeEquals($response, 201);
self::assertStringStartsWith('/api/ezp/v2/content/objects/', $response->getHeader('Location'));
$this->addCreatedElement($response->getHeader('Location'));
return $response->getHeader('Location');
}