diff options
author | Marc Alexander <admin@m-a-styles.de> | 2018-01-01 11:54:37 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2018-01-01 11:54:37 +0100 |
commit | bf5f11e11ac0f25441ba891fc16d5a780e4450e2 (patch) | |
tree | 12aa20249ca31f91fa3c8ab6795a2bce6f55f3a4 /tests/profilefields/type_string_test.php | |
parent | 0ff5f9fa0edf9ac3125cc4e871609a90cee1cfac (diff) | |
parent | f7d387f93c421e93ef13375bd5e0fb408e921598 (diff) | |
download | forums-bf5f11e11ac0f25441ba891fc16d5a780e4450e2.tar forums-bf5f11e11ac0f25441ba891fc16d5a780e4450e2.tar.gz forums-bf5f11e11ac0f25441ba891fc16d5a780e4450e2.tar.bz2 forums-bf5f11e11ac0f25441ba891fc16d5a780e4450e2.tar.xz forums-bf5f11e11ac0f25441ba891fc16d5a780e4450e2.zip |
Merge branch 'ticket/security/211' into ticket/security/211-rhea
Diffstat (limited to 'tests/profilefields/type_string_test.php')
-rw-r--r-- | tests/profilefields/type_string_test.php | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/profilefields/type_string_test.php b/tests/profilefields/type_string_test.php index 7c7fa3f3e6..a5e1d89ef2 100644 --- a/tests/profilefields/type_string_test.php +++ b/tests/profilefields/type_string_test.php @@ -24,7 +24,7 @@ class phpbb_profilefield_type_string_test extends phpbb_test_case */ public function setUp() { - global $request, $user, $cache, $phpbb_root_path, $phpEx; + global $config, $request, $user, $cache, $phpbb_root_path, $phpEx; $user = $this->getMock('\phpbb\user', array(), array( new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)), @@ -34,6 +34,7 @@ class phpbb_profilefield_type_string_test extends phpbb_test_case $user->expects($this->any()) ->method('lang') ->will($this->returnCallback(array($this, 'return_callback_implode'))); + $config = new \phpbb\config\config([]); $request = $this->getMock('\phpbb\request\request'); $template = $this->getMock('\phpbb\template\template'); @@ -269,6 +270,18 @@ class phpbb_profilefield_type_string_test extends phpbb_test_case null, 'Field should simply output null for empty vlaue', ), + array( + 'http://foobar.com', + array('field_show_novalue' => false), + 'http://foobar.com', + 'Field should output the given value but not make it clickable', + ), + array( + 'javascript://foobar.com', + array('field_show_novalue' => true), + 'javascript://foobar.com', + 'Field should output the given value but not make it clickable', + ), ); } |