From e6f9b060dc5e7955ac42e947fbf850c958220277 Mon Sep 17 00:00:00 2001 From: Shitiz Garg Date: Fri, 27 Jun 2014 19:19:18 +0530 Subject: [PATCH] [ticket/12334] Add additional test for type_string PHPBB3-12334 --- 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 0ae91f1e8e..9c483d7f5e 100644 --- a/tests/profilefields/type_string_test.php +++ b/tests/profilefields/type_string_test.php @@ -243,6 +243,30 @@ class phpbb_profilefield_type_string_test extends phpbb_test_case '[b]bbcode test[/b]', 'Field should return correct raw value', ), + array( + 125, + array('field_show_novalue' => false), + 125, + 'Field should return value of integer as is', + ), + array( + 0, + array('field_show_novalue' => false), + null, + 'Field should return null for empty integer without show_novalue', + ), + array( + 0, + array('field_show_novalue' => true), + 0, + 'Field should return 0 for empty integer with show_novalue', + ), + array( + null, + array('field_show_novalue' => true), + null, + 'field should return null value as is', + ), ); }