From f549a6ce9f4758d7e4fff588e407203d6a38fb88 Mon Sep 17 00:00:00 2001 From: Shitiz Garg Date: Wed, 18 Jun 2014 01:40:40 +0530 Subject: [PATCH] [ticket/12514] Add a few more tests for type_date PHPBB3-12514 --- tests/profilefields/type_date_test.php | 36 ++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) 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', + ) ); }