From 80d9e4b2e319b8a1b93c876e5304a6ed7b50b1d8 Mon Sep 17 00:00:00 2001 From: Shitiz Garg Date: Wed, 18 Jun 2014 01:05:57 +0530 Subject: [PATCH] [ticket/12514] Add a few more validation cases for type_string_test PHPBB3-12514 --- tests/profilefields/type_string_test.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tests/profilefields/type_string_test.php b/tests/profilefields/type_string_test.php index f1423d59d9..17adf1f5f4 100644 --- a/tests/profilefields/type_string_test.php +++ b/tests/profilefields/type_string_test.php @@ -60,6 +60,30 @@ class phpbb_profilefield_type_string_test extends phpbb_test_case 'FIELD_REQUIRED-field', 'Field should not accept empty values for required fields', ), + array( + null, + array('field_required' => true), + 'FIELD_REQUIRED-field', + 'Field should not accept empty values for required field', + ), + array( + 0, + array('field_required' => true), + false, + 'Field should accept a non-empty input', + ), + array( + 'false', + array('field_required' => true), + false, + 'Field should accept a non-empty input', + ), + array( + 10, + array('field_required' => true), + false, + 'Field should accept a non-empty input', + ), array( 'tas', array('field_minlen' => 2, 'field_maxlen' => 5),