eZ\Publish\Core\Repository\Tests\Service\Integration\ContentTypeBase::testAssignContentTypeGroupThrowsInvalidArgumentException PHP Метод

testAssignContentTypeGroupThrowsInvalidArgumentException() публичный Метод

Test for the assignContentTypeGroup() method.
    public function testAssignContentTypeGroupThrowsInvalidArgumentException()
    {
        /* BEGIN: Use Case */
        $contentTypeService = $this->repository->getContentTypeService();
        $folderType = $contentTypeService->loadContentTypeByIdentifier('folder');
        $assignedGroups = $folderType->contentTypeGroups;
        foreach ($assignedGroups as $assignedGroup) {
            // Throws an exception, since group is already assigned
            $contentTypeService->assignContentTypeGroup($folderType, $assignedGroup);
        }
        /* END: Use Case */
    }
ContentTypeBase