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

testDeleteContentTypeGroup() public method

Test for the deleteContentTypeGroup() method.
    public function testDeleteContentTypeGroup()
    {
        // Creates ContentTypeGroup with identifier "new-group"
        $this->createContentTypeGroup();
        /* BEGIN: Use Case */
        $contentTypeService = $this->repository->getContentTypeService();
        $group = $contentTypeService->loadContentTypeGroupByIdentifier('new-group');
        $contentTypeService->deleteContentTypeGroup($group);
        /* END: Use Case */
        try {
            $contentTypeService->loadContentTypeGroup($group->id);
            $this->fail('Content type group not deleted.');
        } catch (NotFoundException $e) {
            // All fine
        }
    }
ContentTypeBase