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

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

Test for the updateContentTypeGroup() method.
    public function testUpdateContentTypeGroupThrowsInvalidArgumentException()
    {
        // Creates ContentTypeGroup with identifier "new-group"
        $this->createContentTypeGroup();
        /* BEGIN: Use Case */
        $contentTypeService = $this->repository->getContentTypeService();
        $groupCreate = $contentTypeService->newContentTypeGroupCreateStruct('updated-group');
        $groupCreate->creatorId = $this->repository->getCurrentUserReference()->getUserId();
        // @todo uncomment when support for multilingual names and descriptions is added EZP-24776
        //$groupCreate->names = array( 'eng-US' => 'Name' );
        //$groupCreate->descriptions = array( 'eng-US' => 'Description' );
        $groupToOverwrite = $contentTypeService->createContentTypeGroup($groupCreate);
        $group = $contentTypeService->loadContentTypeGroupByIdentifier('new-group');
        $groupUpdate = $contentTypeService->newContentTypeGroupUpdateStruct();
        $groupUpdate->identifier = 'updated-group';
        // Exception, because group with identifier "updated-group" exists
        $contentTypeService->updateContentTypeGroup($group, $groupUpdate);
        /* END: Use Case */
    }
ContentTypeBase