메소드 | 설명 | |
---|---|---|
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. | |
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. | |
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(). | |
testGetName ( eZ\Publish\SPI\FieldType\Value $value, $expected ) |
메소드 | 설명 | |
---|---|---|
createFieldTypeUnderTest ( ) : FieldType | Returns the field type under test. | |
getEmptyValueExpectation ( ) : |
Returns the empty value expected from the field type. | |
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 | ||
리턴 | FieldType |
protected getEmptyValueExpectation ( ) : |
||
리턴 |
protected getSettingsSchemaExpectation ( ) : array | ||
리턴 | array |
protected getValidatorConfigurationSchemaExpectation ( ) : array | ||
리턴 | array |
return array(
array(
true,
),
array(
array( 'nonExistentKey' => 2 )
),
...
);
public provideInValidFieldSettings ( ) : array | ||
리턴 | 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 | ||
리턴 | 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 | ||
리턴 | 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 | ||
리턴 | array |
return array(
array(
new \stdClass(),
'eZ\\Publish\\Core\\Base\\Exceptions\\InvalidArgumentException',
),
array(
array(),
'eZ\\Publish\\Core\\Base\\Exceptions\\InvalidArgumentException',
),
...
);
public provideInvalidInputForAcceptValue ( ) : array | ||
리턴 | 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 | ||
리턴 | array |
return array(
array(
array(),
),
array(
array( 'rows' => 2 )
),
...
);
public provideValidFieldSettings ( ) : array | ||
리턴 | 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 | ||
리턴 | array |
public testGetName ( eZ\Publish\SPI\FieldType\Value $value, $expected ) | ||
$value | eZ\Publish\SPI\FieldType\Value |