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

testUnassignContentTypeGroupThrowsBadStateException() public method

Test for the unassignContentTypeGroup() method.
    public function testUnassignContentTypeGroupThrowsBadStateException()
    {
        /* BEGIN: Use Case */
        $contentTypeService = $this->repository->getContentTypeService();
        $folderType = $contentTypeService->loadContentTypeByIdentifier('folder');
        $assignedGroups = $folderType->contentTypeGroups;
        foreach ($assignedGroups as $assignedGroup) {
            // Throws an exception, when last group is to be removed
            $contentTypeService->unassignContentTypeGroup($folderType, $assignedGroup);
        }
        /* END: Use Case */
    }
ContentTypeBase