public testCreateContentTypeDraft ( $contentTypeHref ) : string | ||
return | string | the created content type draft href |
public function testCreateContentTypeDraft($contentTypeHref)
{
$content = <<<XML
<?xml version="1.0" encoding="UTF-8"?>
<ContentTypeUpdate>
<names>
<value languageCode="eng-GB">testCreateContentTypeDraft</value>
</names>
</ContentTypeUpdate>
XML;
$request = $this->createHttpRequest('POST', $contentTypeHref, 'ContentTypeUpdate+xml', 'ContentTypeInfo+json');
$request->setContent($content);
$response = $this->sendHttpRequest($request);
self::assertHttpResponseCodeEquals($response, 201);
self::assertHttpResponseHasHeader($response, 'Location');
$href = $response->getHeader('Location');
$this->addCreatedElement($href);
return $href;
}