eZ\Publish\Core\FieldType\Tests\CountryTest::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('fieldSettings' => array('isMultiple' => false)), new CountryValue(array('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.', null, array(), 'countries'))), array(array('fieldSettings' => array('isMultiple' => true)), new CountryValue(array('LE' => array('Name' => 'LegoLand', 'Alpha2' => 'LE', 'Alpha3' => 'LEG', 'IDC' => 888))), array(new ValidationError("Country with Alpha2 code '%alpha2%' is not defined in FieldType settings.", null, array('%alpha2%' => 'LE'), 'countries'))));
    }