[ticket/12514] Add a few more tests for type_date

PHPBB3-12514
This commit is contained in:
Shitiz Garg 2014-06-18 01:40:40 +05:30
parent aee20bcf0c
commit f549a6ce9f

View file

@ -128,6 +128,42 @@ class phpbb_profilefield_type_date_test extends phpbb_test_case
'FIELD_INVALID_DATE-field', 'FIELD_INVALID_DATE-field',
'Field should reject value for being invalid', 'Field should reject value for being invalid',
), ),
array(
'string',
array(),
false,
'Field should reject value for being invalid',
),
array(
'string',
array('field_required' => true),
'FIELD_REQUIRED-field',
'Field should reject value for being invalid',
),
array(
100,
array(),
false,
'Field should reject value for being invalid',
),
array(
100,
array('field_required' => true),
'FIELD_REQUIRED-field',
'Field should reject value for being invalid',
),
array(
null,
array('field_required' => true),
'FIELD_REQUIRED-field',
'Field should reject value for being empty',
),
array(
true,
array('field_required' => true),
'FIELD_REQUIRED-field',
'Field should reject value for being empty',
)
); );
} }