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

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

Test for the createContentTypeGroup() method.
    public function testCreateContentTypeGroupThrowsInvalidArgumentException()
    {
        /* BEGIN: Use Case */
        $contentTypeService = $this->repository->getContentTypeService();
        $groupCreate = $contentTypeService->newContentTypeGroupCreateStruct('new-group');
        // @todo uncomment when support for multilingual names and descriptions is added EZP-24776
        //$groupCreate->names = array( 'eng-GB'=> 'NewGroup' );
        //$groupCreate->descriptions = array();
        $contentTypeService->createContentTypeGroup($groupCreate);
        $secondGroupCreate = $contentTypeService->newContentTypeGroupCreateStruct('new-group');
        // @todo uncomment when support for multilingual names and descriptions is added EZP-24776
        //$secondGroupCreate->names = array( 'eng-GB'=> 'NewGroup' );
        //$secondGroupCreate->descriptions = array();
        // Throws an exception because group with identifier "new-group" already exists
        $contentTypeService->createContentTypeGroup($secondGroupCreate);
        /* END: Use Case */
    }
ContentTypeBase