diff options
author | Shitiz Garg <mail@dragooon.net> | 2014-06-18 01:40:40 +0530 |
---|---|---|
committer | Shitiz Garg <mail@dragooon.net> | 2014-06-18 01:40:40 +0530 |
commit | f549a6ce9f4758d7e4fff588e407203d6a38fb88 (patch) | |
tree | 0961227719801baea4e87b0c3abdbb88bcaae9ae /tests/profilefields | |
parent | aee20bcf0c94f37656b3d8bf213649a4ca702df6 (diff) | |
download | forums-f549a6ce9f4758d7e4fff588e407203d6a38fb88.tar forums-f549a6ce9f4758d7e4fff588e407203d6a38fb88.tar.gz forums-f549a6ce9f4758d7e4fff588e407203d6a38fb88.tar.bz2 forums-f549a6ce9f4758d7e4fff588e407203d6a38fb88.tar.xz forums-f549a6ce9f4758d7e4fff588e407203d6a38fb88.zip |
[ticket/12514] Add a few more tests for type_date
PHPBB3-12514
Diffstat (limited to 'tests/profilefields')
-rw-r--r-- | tests/profilefields/type_date_test.php | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/profilefields/type_date_test.php b/tests/profilefields/type_date_test.php index 013d9d9082..b0ac114942 100644 --- a/tests/profilefields/type_date_test.php +++ b/tests/profilefields/type_date_test.php @@ -128,6 +128,42 @@ class phpbb_profilefield_type_date_test extends phpbb_test_case 'FIELD_INVALID_DATE-field', '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', + ) ); } |