mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/12334] Add get_profile_value_raw unit test for type_string
PHPBB3-12334
This commit is contained in:
parent
e9fbaac212
commit
ab6d36dd57
1 changed files with 30 additions and 0 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Reference in a new issue