eZ\Publish\Core\Repository\Tests\Service\Integration\ContentBase::testCreateContentDraftThrowsBadStateException PHP Method

testCreateContentDraftThrowsBadStateException() public method

Test for the createContentDraft() method.
    public function testCreateContentDraftThrowsBadStateException()
    {
        $contentService = $this->repository->getContentService();
        $contentInfo = $contentService->loadContentInfo(4);
        $draftContent = $contentService->createContentDraft($contentInfo);
        // Throws an exception because version status is not
        // VersionInfo::STATUS_PUBLISHED nor VersionInfo::STATUS_ARCHIVED
        $draftContent = $contentService->createContentDraft($draftContent->contentInfo, $draftContent->getVersionInfo());
    }
ContentBase