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

testDeleteContentType() public method

Test for the deleteContentType() method.
    public function testDeleteContentType()
    {
        /* BEGIN: Use Case */
        $contentTypeService = $this->repository->getContentTypeService();
        $commentType = $contentTypeService->loadContentTypeByIdentifier('comment');
        $contentTypeService->deleteContentType($commentType);
        /* END: Use Case */
        try {
            $contentTypeService->loadContentType($commentType->id);
            $this->fail('Content type could be loaded after delete.');
        } catch (NotFoundException $e) {
            // All fine
        }
    }
ContentTypeBase