aboutsummaryrefslogtreecommitdiffstats
path: root/tests/profilefields
diff options
context:
space:
mode:
authorShitiz Garg <mail@dragooon.net>2014-06-27 19:19:18 +0530
committerShitiz Garg <mail@dragooon.net>2014-06-27 19:19:18 +0530
commite6f9b060dc5e7955ac42e947fbf850c958220277 (patch)
tree744629f36fb31e26d5d85eee719732c99204cc5b /tests/profilefields
parent8cb7afa503362a8e1725591d9619c8712b0b86c0 (diff)
downloadforums-e6f9b060dc5e7955ac42e947fbf850c958220277.tar
forums-e6f9b060dc5e7955ac42e947fbf850c958220277.tar.gz
forums-e6f9b060dc5e7955ac42e947fbf850c958220277.tar.bz2
forums-e6f9b060dc5e7955ac42e947fbf850c958220277.tar.xz
forums-e6f9b060dc5e7955ac42e947fbf850c958220277.zip
[ticket/12334] Add additional test for type_string
PHPBB3-12334
Diffstat (limited to 'tests/profilefields')
-rw-r--r--tests/profilefields/type_string_test.php24
1 files changed, 24 insertions, 0 deletions
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',
+ ),
);
}