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

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

Public Methods

Method Description
getParseHrefExpectationsMap ( )
providerForTestParseFailureInvalidDate ( )
providerForTestParseFailureInvalidHref ( )
testParseFailureInvalidDate ( $element, $exceptionMessage ) Tests that invalid dates will fail at parsing.
testParseFailureInvalidHref ( $element, $exceptionMessage ) Tests that invalid _href attribute throw the appropriate exception.
testParseValid ( ) : RestContentMetadataUpdateStruct Tests the ContentUpdate parser.
testParserResultOwner ( RestContentMetadataUpdateStruct $result ) Test for valid owner ID value in result.

Protected Methods

Method Description
getContentUpdateStruct ( ) : RestContentMetadataUpdateStruct Returns a valid RestContentMetadataUpdateStruct that matches the structure from getValidInputData().
getValidInputData ( ) : array Returns an array of valid input data for the parser.
internalGetParser ( ) : ContentUpdate Returns the ContentUpdate parser.

Method Details

getContentUpdateStruct() protected method

Returns a valid RestContentMetadataUpdateStruct that matches the structure from getValidInputData().

getParseHrefExpectationsMap() public method

getValidInputData() protected method

Returns an array of valid input data for the parser.
protected getValidInputData ( ) : array
return array

internalGetParser() protected method

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

providerForTestParseFailureInvalidDate() public method

providerForTestParseFailureInvalidHref() public method

testParseFailureInvalidDate() public method

Tests that invalid dates will fail at parsing.
public testParseFailureInvalidDate ( $element, $exceptionMessage )

testParseFailureInvalidHref() public method

Tests that invalid _href attribute throw the appropriate exception.
public testParseFailureInvalidHref ( $element, $exceptionMessage )

testParseValid() public method

Tests the ContentUpdate parser.

testParserResultOwner() public method

Test for valid owner ID value in result.