Method | Description | |
---|---|---|
getImageInputPath ( ) | ||
provideDataForGetName ( ) | ||
provideInputForFromHash ( ) : array | Provide input to fromHash() method. | |
provideInputForToHash ( ) : array | Provide input for the toHash() method. | |
provideInvalidDataForValidate ( ) : array | Provides data sets with validator configuration and/or field settings, field value and corresponding validation errors returned by the {@link validate()} method. | |
provideInvalidInputForAcceptValue ( ) : array | Data provider for invalid input to acceptValue(). | |
provideValidDataForValidate ( ) : array | Provides data sets with validator configuration and/or field settings and field value which are considered valid by the {@link validate()} method. | |
provideValidInputForAcceptValue ( ) : array | Data provider for valid input to acceptValue(). |
Method | Description | |
---|---|---|
createFieldTypeUnderTest ( ) : FieldType | Returns the field type under test. | |
getEmptyValueExpectation ( ) : |
Returns the empty value expected from the field type. | |
getMimeTypeDetectorMock ( ) : eZ\Publish\SPI\FieldType\BinaryBase\MimeTypeDetector | ||
getSettingsSchemaExpectation ( ) : array | Returns the settings schema expected from the field type. | |
getValidatorConfigurationSchemaExpectation ( ) : array | Returns the validator configuration schema expected from the field type. | |
provideFieldTypeIdentifier ( ) |
protected createFieldTypeUnderTest ( ) : FieldType | ||
return | FieldType |
protected getEmptyValueExpectation ( ) : |
||
return |
protected getMimeTypeDetectorMock ( ) : eZ\Publish\SPI\FieldType\BinaryBase\MimeTypeDetector | ||
return | eZ\Publish\SPI\FieldType\BinaryBase\MimeTypeDetector |
protected getSettingsSchemaExpectation ( ) : array | ||
return | array |
protected getValidatorConfigurationSchemaExpectation ( ) : array | ||
return | array |
return array(
array(
null,
null
),
array(
array(
'path' => 'some/file/here',
'fileName' => 'sindelfingen.jpg',
'fileSize' => 2342,
'downloadCount' => 0,
'mimeType' => 'image/jpeg',
),
new BinaryFileValue( array(
'path' => 'some/file/here',
'fileName' => 'sindelfingen.jpg',
'fileSize' => 2342,
'downloadCount' => 0,
'mimeType' => 'image/jpeg',
) )
),
...
);
public provideInputForFromHash ( ) : array | ||
return | array |
return array(
array(
null,
null
),
array(
new BinaryFileValue( array(
'path' => 'some/file/here',
'fileName' => 'sindelfingen.jpg',
'fileSize' => 2342,
'downloadCount' => 0,
'mimeType' => 'image/jpeg',
) ),
array(
'path' => 'some/file/here',
'fileName' => 'sindelfingen.jpg',
'fileSize' => 2342,
'downloadCount' => 0,
'mimeType' => 'image/jpeg',
)
),
...
);
public provideInputForToHash ( ) : array | ||
return | array |
return array(
array(
array(
"validatorConfiguration" => array(
"IntegerValueValidator" => array(
"minIntegerValue" => 5,
"maxIntegerValue" => 10
),
),
),
new IntegerValue( 3 ),
array(
new ValidationError(
"The value can not be lower than %size%.",
null,
array(
"size" => 5
),
),
),
),
array(
array(
"fieldSettings" => array(
"isMultiple" => false
),
),
new CountryValue(
"BE" => array(
"Name" => "Belgium",
"Alpha2" => "BE",
"Alpha3" => "BEL",
"IDC" => 32,
),
"FR" => array(
"Name" => "France",
"Alpha2" => "FR",
"Alpha3" => "FRA",
"IDC" => 33,
),
)
),
array(
new ValidationError(
"Field definition does not allow multiple countries to be selected."
),
),
...
);
public provideInvalidDataForValidate ( ) : array | ||
return | array |
return array(
array(
new \stdClass(),
'eZ\\Publish\\Core\\Base\\Exceptions\\InvalidArgumentException',
),
array(
array(),
'eZ\\Publish\\Core\\Base\\Exceptions\\InvalidArgumentException',
),
...
);
public provideInvalidInputForAcceptValue ( ) : array | ||
return | array |
return array(
array(
array(
"validatorConfiguration" => array(
"StringLengthValidator" => array(
"minStringLength" => 2,
"maxStringLength" => 10,
),
),
),
new TextLineValue( "lalalala" ),
),
array(
array(
"fieldSettings" => array(
'isMultiple' => true
),
),
new CountryValue(
array(
"BE" => array(
"Name" => "Belgium",
"Alpha2" => "BE",
"Alpha3" => "BEL",
"IDC" => 32,
),
),
),
),
...
);
public provideValidDataForValidate ( ) : array | ||
return | array |
return array(
array(
null,
null
),
array(
__FILE__,
new BinaryFileValue( array(
'id' => __FILE__,
'fileName' => basename( __FILE__ ),
'fileSize' => filesize( __FILE__ ),
'downloadCount' => 0,
'mimeType' => 'text/plain',
) )
),
...
);
public provideValidInputForAcceptValue ( ) : array | ||
return | array |