From 179a4700221aa49071b07d638c44b9326c7a14a8 Mon Sep 17 00:00:00 2001 From: MateBartus Date: Tue, 14 Apr 2015 02:31:23 +0200 Subject: [ticket/13762] Moving language related functionality into a separate class PHPBB3-13762 --- tests/profilefields/type_string_test.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tests/profilefields/type_string_test.php') diff --git a/tests/profilefields/type_string_test.php b/tests/profilefields/type_string_test.php index 0417afbfab..447ab32a00 100644 --- a/tests/profilefields/type_string_test.php +++ b/tests/profilefields/type_string_test.php @@ -28,9 +28,12 @@ class phpbb_profilefield_type_string_test extends phpbb_test_case */ public function setUp() { - global $request, $user, $cache; + global $request, $user, $cache, $phpbb_root_path, $phpEx; - $user = $this->getMock('\phpbb\user', array(), array('\phpbb\datetime')); + $user = $this->getMock('\phpbb\user', array(), array( + new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)), + '\phpbb\datetime' + )); $cache = new phpbb_mock_cache; $user->expects($this->any()) ->method('lang') -- cgit v1.2.1 From 14e8113fcf01be7dbdb080458fcbf4e75668cc1a Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Thu, 31 Mar 2016 11:06:47 -0700 Subject: [ticket/14576] Move common required files to bootstrap PHPBB3-14576 --- tests/profilefields/type_string_test.php | 4 ---- 1 file changed, 4 deletions(-) (limited to 'tests/profilefields/type_string_test.php') diff --git a/tests/profilefields/type_string_test.php b/tests/profilefields/type_string_test.php index 447ab32a00..7c7fa3f3e6 100644 --- a/tests/profilefields/type_string_test.php +++ b/tests/profilefields/type_string_test.php @@ -11,10 +11,6 @@ * */ -require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; -require_once dirname(__FILE__) . '/../../phpBB/includes/functions_content.php'; -require_once dirname(__FILE__) . '/../../phpBB/includes/utf/utf_tools.php'; - class phpbb_profilefield_type_string_test extends phpbb_test_case { protected $cp; -- cgit v1.2.1 From 91f9050a70d95a472daf9f6fa15187c195f05909 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 23 Jul 2017 11:18:07 +0200 Subject: [ticket/security/211] Extend tests for profile field values SECURITY-211 --- tests/profilefields/type_string_test.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/profilefields/type_string_test.php') diff --git a/tests/profilefields/type_string_test.php b/tests/profilefields/type_string_test.php index 0417afbfab..43f88c01ae 100644 --- a/tests/profilefields/type_string_test.php +++ b/tests/profilefields/type_string_test.php @@ -270,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', + ), ); } -- cgit v1.2.1 From 342a7cbd55829283663ad6ba29f924eeb53fca38 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 3 Aug 2017 22:20:33 +0200 Subject: [ticket/security/211] Allow make_clickable() again after change to regex SECURITY-211 --- tests/profilefields/type_string_test.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/profilefields/type_string_test.php') diff --git a/tests/profilefields/type_string_test.php b/tests/profilefields/type_string_test.php index 43f88c01ae..9709b48470 100644 --- a/tests/profilefields/type_string_test.php +++ b/tests/profilefields/type_string_test.php @@ -273,8 +273,8 @@ class phpbb_profilefield_type_string_test extends phpbb_test_case array( 'http://foobar.com', array('field_show_novalue' => false), - 'http://foobar.com', - 'Field should output the given value but not make it clickable', + 'foobar.com', + 'Field should output the given value and make it clickable', ), array( 'javascript://foobar.com', -- cgit v1.2.1