diff options
author | Shitiz Garg <mail@dragooon.net> | 2014-06-24 22:22:10 +0530 |
---|---|---|
committer | Shitiz Garg <mail@dragooon.net> | 2014-06-24 22:46:33 +0530 |
commit | ab6d36dd576aadf37a36da2cd2f4ba1219540253 (patch) | |
tree | 2b20db55fd2eef2213a22028bb9bc93eb3116387 /tests/profilefields | |
parent | e9fbaac2124f96a41ff6633f23fd195e15db0bc7 (diff) | |
download | forums-ab6d36dd576aadf37a36da2cd2f4ba1219540253.tar forums-ab6d36dd576aadf37a36da2cd2f4ba1219540253.tar.gz forums-ab6d36dd576aadf37a36da2cd2f4ba1219540253.tar.bz2 forums-ab6d36dd576aadf37a36da2cd2f4ba1219540253.tar.xz forums-ab6d36dd576aadf37a36da2cd2f4ba1219540253.zip |
[ticket/12334] Add get_profile_value_raw unit test for type_string
PHPBB3-12334
Diffstat (limited to 'tests/profilefields')
-rw-r--r-- | tests/profilefields/type_string_test.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/profilefields/type_string_test.php b/tests/profilefields/type_string_test.php index cee8a1d863..2b3d239c3e 100644 --- a/tests/profilefields/type_string_test.php +++ b/tests/profilefields/type_string_test.php @@ -225,6 +225,36 @@ class phpbb_profilefield_type_string_test extends phpbb_test_case $this->assertSame($expected, $result, $description); } + public function get_profile_value_raw_data() + { + return array( + array( + '[b]bbcode test[/b]', + array('field_show_novalue' => true), + '[b]bbcode test[/b]', + 'Field should return the correct raw value', + ), + array( + '[b]bbcode test[/b]', + array('field_show_novalue' => false), + '[b]bbcode test[/b]', + 'Field should return correct raw value', + ), + ); + } + + /** + * @dataProvider get_profile_value_raw_data + */ + public function test_get_profile_value_raw($value, $field_options, $expected, $description) + { + $field_options = array_merge($this->field_options, $field_options); + + $result = $this->cp->get_profile_value_raw($value, $field_options); + + $this->assertSame($expected, $result, $description); + } + public function return_callback_implode() { return implode('-', func_get_args()); |