public testCreateContentRequiredFieldDefaultValueEmpty ( ) : array | ||
Результат | array |
public function testCreateContentRequiredFieldDefaultValueEmpty()
{
$testContentType = $this->createTestContentType();
/* BEGIN: Use Case */
$contentService = $this->repository->getContentService();
$contentCreate = $contentService->newContentCreateStruct($testContentType, 'eng-GB');
$contentCreate->setField('test_translatable', 'Jabberwock');
$contentCreate->sectionId = 1;
$contentCreate->ownerId = 14;
$contentCreate->remoteId = 'abcdef0123456789abcdef0123456789';
$contentCreate->alwaysAvailable = true;
// Throws an exception because required field is not set and its default value is empty
$contentService->createContent($contentCreate);
/* END: Use Case */
}