eZ\Publish\Core\Repository\Tests\Service\Integration\ContentTypeBase::testUpdateContentTypeDraftThrowsInvalidArgumentExceptionDuplicateIdentifier PHP Метод

testUpdateContentTypeDraftThrowsInvalidArgumentExceptionDuplicateIdentifier() публичный Метод

Test for the updateContentTypeDraft() method.
    public function testUpdateContentTypeDraftThrowsInvalidArgumentExceptionDuplicateIdentifier()
    {
        $contentTypeDraft = $this->createDraftContentType();
        /* BEGIN: Use Case */
        // $contentTypeDraft contains a ContentTypeDraft with identifier 'blog-post'
        $contentTypeService = $this->repository->getContentTypeService();
        $typeUpdate = $contentTypeService->newContentTypeUpdateStruct();
        $typeUpdate->identifier = 'folder';
        // Throws exception, since type "folder" already exists
        $contentTypeService->updateContentTypeDraft($contentTypeDraft, $typeUpdate);
        /* END: Use Case */
    }
ContentTypeBase