eZ\Publish\Core\Repository\Tests\Service\Integration\ContentTypeBase::testCreateContentTypeDraftThrowsBadStateException PHP Method

testCreateContentTypeDraftThrowsBadStateException() public method

Test for the createContentTypeDraft() method.
    public function testCreateContentTypeDraftThrowsBadStateException()
    {
        $publishedType = $this->createPublishedContentType();
        // Create draft for current user
        $this->repository->getContentTypeService()->createContentTypeDraft($publishedType);
        /* BEGIN: Use case */
        // $publishedType contains a ContentType object
        $contentTypeService = $this->repository->getContentTypeService();
        // Throws an exception because ContentType has an existing draft belonging to another user
        $draft = $contentTypeService->createContentTypeDraft($publishedType);
        /* END: Use case */
    }
ContentTypeBase