Property | Type | Description | |
---|---|---|---|
$hashReference | |||
$pageReference |
Method | 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 ( ) : array | Data provider for invalid input to acceptValue(). | |
provideValidFieldSettings ( ) : array | Provide data sets with field settings which are considered valid by the {@link validateFieldSettings()} method. | |
provideValidInputForAcceptValue ( ) : array | Data provider for valid input to acceptValue(). | |
providerForTestIsEmptyValue ( ) : array | Data provider for valid input to isEmptyValue(). | |
testIsEmptyValue ( $value, $state ) |
Method | Description | |
---|---|---|
createFieldTypeUnderTest ( ) : FieldType | Returns the field type under test. | |
getEmptyValueExpectation ( ) | Returns the empty value expected from the field type. | |
getHashReference ( ) | ||
getPageReference ( ) | ||
getSettingsSchemaExpectation ( ) : array | Returns the settings schema expected from the field type. | |
getValidatorConfigurationSchemaExpectation ( ) : array | Returns the validator configuration schema expected from the field type. | |
provideFieldTypeIdentifier ( ) |
Method | Description | |
---|---|---|
getPageServiceMock ( ) |
protected createFieldTypeUnderTest ( ) : FieldType | ||
return | FieldType |
protected getEmptyValueExpectation ( ) |
protected getSettingsSchemaExpectation ( ) : array | ||
return | array |
protected getValidatorConfigurationSchemaExpectation ( ) : array | ||
return | array |
return array(
array(
true,
),
array(
array( 'nonExistentKey' => 2 )
),
...
);
public provideInValidFieldSettings ( ) : 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(
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(),
),
array(
array( 'rows' => 2 )
),
...
);
public provideValidFieldSettings ( ) : array | ||
return | array |
return array(
array(
null,
null
),
array(
__FILE__,
new BinaryFileValue( array(
'path' => __FILE__,
'fileName' => basename( __FILE__ ),
'fileSize' => filesize( __FILE__ ),
'downloadCount' => 0,
'mimeType' => 'text/plain',
) )
),
...
);
public provideValidInputForAcceptValue ( ) : array | ||
return | array |
return array(
array(
new PageValue(),
true
),
array(
new PageValue( $this->getPageReference() ),
false
),
...
);
public providerForTestIsEmptyValue ( ) : array | ||
return | array |