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

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

Test for the publishContentTypeDraft() method.
    public function testPublishContentTypeDraftThrowsInvalidArgumentException()
    {
        $contentTypeService = $this->repository->getContentTypeService();
        $typeCreateStruct = $contentTypeService->newContentTypeCreateStruct('new-type');
        $typeCreateStruct->names = array('eng-GB' => 'Type title');
        $typeCreateStruct->mainLanguageCode = 'eng-GB';
        $type = $contentTypeService->createContentType($typeCreateStruct, $this->createGroups());
        // Throws an exception because type has no field definitions
        $contentTypeService->publishContentTypeDraft($type);
    }
ContentTypeBase