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); }