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

testDeleteVersion() public method

Test for the deleteVersion() method.
public testDeleteVersion ( )
    public function testDeleteVersion()
    {
        /* BEGIN: Use Case */
        $contentService = $this->repository->getContentService();
        $contentInfo = $contentService->loadContentInfo(4);
        // Create a version to delete
        $draftContent = $contentService->createContentDraft($contentInfo);
        $contentService->deleteVersion($draftContent->versionInfo);
        /* END: Use Case */
        try {
            $contentService->loadVersionInfo($draftContent->contentInfo, $draftContent->versionInfo->versionNo);
            $this->fail('Version was not successfully deleted!');
        } catch (NotFoundException $e) {
            // Do nothing
        }
    }
ContentBase