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

testDeleteRelationThrowsBadStateException() public method

Test for the deleteRelation() method.
    public function testDeleteRelationThrowsBadStateException()
    {
        $contentService = $this->repository->getContentService();
        list($contentDraft, $contentType) = $this->createTestContent();
        $mediaContentInfo = $contentService->loadContentInfoByRemoteId('a6e35cbcb7cd6ae4b691f3eee30cd262');
        $contentService->addRelation($contentDraft->getVersionInfo(), $mediaContentInfo);
        $publishedContent = $contentService->publishVersion($contentDraft->versionInfo);
        $contentService->deleteRelation($publishedContent->getVersionInfo(), $mediaContentInfo);
    }
ContentBase