PHP Class eZ\Publish\Core\REST\Server\Tests\Input\Parser\ContentCreateTest

Inheritance: extends BaseTest
Show file Open project: ezsystems/ezpublish-kernel

Public Methods

Method Description
getParseHrefExpectationsMap ( )
testParse ( ) Tests the ContentCreate parser.
testParseExceptionOnInvalidContentType ( ) Test ContentCreate parser throwing exception on invalid ContentType.
testParseExceptionOnInvalidFieldDefinitionIdentifier ( ) Test ContentCreate parser throwing exception on invalid field definition identifier.
testParseExceptionOnInvalidFields ( ) Test ContentCreate parser throwing exception on invalid fields data.
testParseExceptionOnInvalidSection ( ) Test ContentCreate parser throwing exception on invalid Section.
testParseExceptionOnInvalidUser ( ) Test ContentCreate parser throwing exception on invalid User.
testParseExceptionOnMissingContentType ( ) Test ContentCreate parser throwing exception on missing ContentType.
testParseExceptionOnMissingFieldDefinitionIdentifier ( ) Test ContentCreate parser throwing exception on missing field definition identifier.
testParseExceptionOnMissingFieldValue ( ) Test ContentCreate parser throwing exception on missing field value.
testParseExceptionOnMissingLocationCreate ( ) Test ContentCreate parser throwing exception on missing LocationCreate.
testParseExceptionOnMissingMainLanguageCode ( ) Test ContentCreate parser throwing exception on missing mainLanguageCode.

Protected Methods

Method Description
getContentServiceMock ( ) : eZ\Publish\API\Repository\ContentService Get the content service mock object.
getContentType ( ) : eZ\Publish\API\Repository\Values\ContentType\ContentType Get the content type used in ContentCreate parser.
getContentTypeServiceMock ( ) : eZ\Publish\API\Repository\ContentTypeService Get the content type service mock object.
internalGetParser ( ) : ContentCreate Returns the ContentCreate parser.

Private Methods

Method Description
getFieldTypeParserMock ( ) : eZ\Publish\Core\REST\Common\Input\FieldTypeParser; Get the field type parser mock object.
getLocationCreateParserMock ( ) : LocationCreate Returns the LocationCreate parser mock object.

Method Details

getContentServiceMock() protected method

Get the content service mock object.
protected getContentServiceMock ( ) : eZ\Publish\API\Repository\ContentService
return eZ\Publish\API\Repository\ContentService

getContentType() protected method

Get the content type used in ContentCreate parser.
protected getContentType ( ) : eZ\Publish\API\Repository\Values\ContentType\ContentType
return eZ\Publish\API\Repository\Values\ContentType\ContentType

getContentTypeServiceMock() protected method

Get the content type service mock object.
protected getContentTypeServiceMock ( ) : eZ\Publish\API\Repository\ContentTypeService
return eZ\Publish\API\Repository\ContentTypeService

getParseHrefExpectationsMap() public method

internalGetParser() protected method

Returns the ContentCreate parser.
protected internalGetParser ( ) : ContentCreate
return eZ\Publish\Core\REST\Server\Input\Parser\ContentCreate

testParse() public method

Tests the ContentCreate parser.
public testParse ( )

testParseExceptionOnInvalidContentType() public method

Test ContentCreate parser throwing exception on invalid ContentType.

testParseExceptionOnInvalidFieldDefinitionIdentifier() public method

Test ContentCreate parser throwing exception on invalid field definition identifier.

testParseExceptionOnInvalidFields() public method

Test ContentCreate parser throwing exception on invalid fields data.

testParseExceptionOnInvalidSection() public method

Test ContentCreate parser throwing exception on invalid Section.

testParseExceptionOnInvalidUser() public method

Test ContentCreate parser throwing exception on invalid User.

testParseExceptionOnMissingContentType() public method

Test ContentCreate parser throwing exception on missing ContentType.

testParseExceptionOnMissingFieldDefinitionIdentifier() public method

Test ContentCreate parser throwing exception on missing field definition identifier.

testParseExceptionOnMissingFieldValue() public method

Test ContentCreate parser throwing exception on missing field value.

testParseExceptionOnMissingLocationCreate() public method

Test ContentCreate parser throwing exception on missing LocationCreate.

testParseExceptionOnMissingMainLanguageCode() public method

Test ContentCreate parser throwing exception on missing mainLanguageCode.