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

Inheritance: extends BinaryBaseTest
Afficher le fichier Open project: ezsystems/ezpublish-kernel

Méthodes publiques

Méthode Description
provideDataForGetName ( )
provideInValidFieldSettings ( ) : array Provide data sets with field settings which are considered invalid by the {@link validateFieldSettings()} method. The method must return a non-empty array of validation error when receiving such field settings.
provideInputForFromHash ( ) : array Provide input to fromHash() method.
provideInputForToHash ( ) : array Provide input for the toHash() method.
provideInvalidInputForAcceptValue ( )
provideValidFieldSettings ( ) : array Provide data sets with field settings which are considered valid by the {@link validateFieldSettings()} method.
provideValidInputForAcceptValue ( )

Méthodes protégées

Méthode Description
createFieldTypeUnderTest ( ) : FieldType Returns the field type under test.
getEmptyValueExpectation ( )
getSettingsSchemaExpectation ( )
provideFieldTypeIdentifier ( )

Method Details

createFieldTypeUnderTest() protected méthode

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
Résultat FieldType

getEmptyValueExpectation() protected méthode

protected getEmptyValueExpectation ( )

getSettingsSchemaExpectation() protected méthode

provideDataForGetName() public méthode

provideFieldTypeIdentifier() protected méthode

provideInValidFieldSettings() public méthode

Returns an array of data provider sets with a single argument: A valid set of field settings. For example: return array( array( true, ), array( array( 'nonExistentKey' => 2 ) ), ... );
public provideInValidFieldSettings ( ) : array
Résultat array

provideInputForFromHash() public méthode

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
Résultat array

provideInputForToHash() public méthode

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
Résultat array

provideInvalidInputForAcceptValue() public méthode

provideValidFieldSettings() public méthode

Returns an array of data provider sets with a single argument: A valid set of field settings. For example: return array( array( array(), ), array( array( 'rows' => 2 ) ), ... );
public provideValidFieldSettings ( ) : array
Résultat array

provideValidInputForAcceptValue() public méthode