eZ\Publish\Core\FieldType\Tests\SelectionTest::provideInvalidDataForValidate PHP Method

provideInvalidDataForValidate() public method

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 function provideInvalidDataForValidate()
    {
        return array(array(array('fieldSettings' => array('isMultiple' => false, 'options' => array(0 => 1, 1 => 2))), new SelectionValue(array(0, 1)), array(new ValidationError('Field definition does not allow multiple options to be selected.', null, array(), 'selection'))), array(array('fieldSettings' => array('isMultiple' => false, 'options' => array(0 => 1, 1 => 2))), new SelectionValue(array(3)), array(new ValidationError('Option with index %index% does not exist in the field definition.', null, array('%index%' => 3), 'selection'))));
    }