eZ\Publish\Core\FieldType\Tests\IntegerTest::provideInvalidDataForValidate PHP Метод

provideInvalidDataForValidate() публичный Метод

ATTENTION: This is a default implementation, which must be overwritten if a FieldType supports validation! For example: 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
    public function provideInvalidDataForValidate()
    {
        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), 'value'))), array(array('validatorConfiguration' => array('IntegerValueValidator' => array('minIntegerValue' => 5, 'maxIntegerValue' => 10))), new IntegerValue(13), array(new ValidationError('The value can not be higher than %size%.', null, array('%size%' => 10), 'value'))), array(array('validatorConfiguration' => array('IntegerValueValidator' => array('minIntegerValue' => 10, 'maxIntegerValue' => 5))), new IntegerValue(7), array(new ValidationError('The value can not be higher than %size%.', null, array('%size%' => 5), 'value'), new ValidationError('The value can not be lower than %size%.', null, array('%size%' => 10), 'value'))));
    }