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

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

Test for the createContentTypeGroup() method.
public testCreateContentTypeGroup ( ) : array
Результат array
    public function testCreateContentTypeGroup()
    {
        /* BEGIN: Use Case */
        $contentTypeService = $this->repository->getContentTypeService();
        $groupCreate = $contentTypeService->newContentTypeGroupCreateStruct('new-group');
        $groupCreate->creatorId = $this->repository->getCurrentUserReference()->getUserId();
        $groupCreate->creationDate = new \DateTime();
        // @todo uncomment when support for multilingual names and descriptions is added EZP-24776
        //$groupCreate->mainLanguageCode = 'eng-GB';
        //$groupCreate->names = array( 'eng-US' => 'A name.' );
        //$groupCreate->descriptions = array( 'eng-US' => 'A description.' );
        $group = $contentTypeService->createContentTypeGroup($groupCreate);
        /* END: Use Case */
        $this->assertInstanceOf('eZ\\Publish\\API\\Repository\\Values\\ContentType\\ContentTypeGroup', $group);
        return array('expected' => $groupCreate, 'actual' => $group);
    }
ContentTypeBase