PHP Class eZ\Publish\Core\FieldType\Tests\BinaryFileTest

Inheritance: extends BinaryBaseTest
Datei anzeigen Open project: ezsystems/ezpublish-kernel

Public Methods

Method Description
provideDataForGetName ( )
provideInputForFromHash ( ) : array Provide input to fromHash() method.
provideInputForToHash ( ) : array Provide input for the toHash() method.
provideInvalidInputForAcceptValue ( )
provideValidInputForAcceptValue ( )

Protected Methods

Method Description
createFieldTypeUnderTest ( ) : FieldType Returns the field type under test.
getEmptyValueExpectation ( )
provideFieldTypeIdentifier ( )

Method Details

createFieldTypeUnderTest() protected method

This method is used by all test cases to retrieve the field type under test. Just create the FieldType instance using mocks from the provided get*Mock() methods and/or custom get*Mock() implementations. You MUST NOT take care for test case wide caching of the field type, just return a new instance from this method!
protected createFieldTypeUnderTest ( ) : FieldType
return FieldType

getEmptyValueExpectation() protected method

protected getEmptyValueExpectation ( )

provideDataForGetName() public method

provideFieldTypeIdentifier() protected method

provideInputForFromHash() public method

Returns an array of data provider sets with 2 arguments: 1. The valid input to fromHash(), 2. The expected return value from fromHash(). For example: return array( array( null, null ), array( array( 'id' => 'some/file/here', 'fileName' => 'sindelfingen.jpg', 'fileSize' => 2342, 'downloadCount' => 0, 'mimeType' => 'image/jpeg', ), new BinaryFileValue( array( 'id' => 'some/file/here', 'fileName' => 'sindelfingen.jpg', 'fileSize' => 2342, 'downloadCount' => 0, 'mimeType' => 'image/jpeg', ) ) ), ... );
public provideInputForFromHash ( ) : array
return array

provideInputForToHash() public method

Returns an array of data provider sets with 2 arguments: 1. The valid input to toHash(), 2. The expected return value from toHash(). For example: return array( array( null, null ), array( new BinaryFileValue( array( 'id' => 'some/file/here', 'fileName' => 'sindelfingen.jpg', 'fileSize' => 2342, 'downloadCount' => 0, 'mimeType' => 'image/jpeg', ) ), array( 'id' => 'some/file/here', 'fileName' => 'sindelfingen.jpg', 'fileSize' => 2342, 'downloadCount' => 0, 'mimeType' => 'image/jpeg', ) ), ... );
public provideInputForToHash ( ) : array
return array

provideInvalidInputForAcceptValue() public method

provideValidInputForAcceptValue() public method