diff options
author | Maat <maat-pub@mageia.biz> | 2020-05-08 18:29:30 +0200 |
---|---|---|
committer | Maat <maat-pub@mageia.biz> | 2020-05-08 21:36:04 +0200 |
commit | 36bc1870f21fac04736a1049c1d5b8e127d729f4 (patch) | |
tree | 9d102331eeaf1ef3cd23e656320d7c08e65757ed /tests/functions_content | |
parent | 8875d385d0579b451dac4d9bda465172b4f69ee0 (diff) | |
parent | 149375253685b3a38996f63015a74b7a0f53aa14 (diff) | |
download | forums-36bc1870f21fac04736a1049c1d5b8e127d729f4.tar forums-36bc1870f21fac04736a1049c1d5b8e127d729f4.tar.gz forums-36bc1870f21fac04736a1049c1d5b8e127d729f4.tar.bz2 forums-36bc1870f21fac04736a1049c1d5b8e127d729f4.tar.xz forums-36bc1870f21fac04736a1049c1d5b8e127d729f4.zip |
Merge remote-tracking branch 'upstream/prep-release-3.1.11'
Diffstat (limited to 'tests/functions_content')
-rw-r--r-- | tests/functions_content/get_username_string_test.php | 29 | ||||
-rw-r--r-- | tests/functions_content/phpbb_clean_search_string_test.php | 10 |
2 files changed, 24 insertions, 15 deletions
diff --git a/tests/functions_content/get_username_string_test.php b/tests/functions_content/get_username_string_test.php index 48e8936cc1..01ec97f6a4 100644 --- a/tests/functions_content/get_username_string_test.php +++ b/tests/functions_content/get_username_string_test.php @@ -1,9 +1,13 @@ <?php /** * -* @package testing -* @copyright (c) 2014 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. * */ @@ -16,14 +20,15 @@ class phpbb_functions_content_get_username_string_test extends phpbb_test_case { parent::setUp(); - global $auth, $user; - $auth = $this->getMock('auth'); + global $auth, $phpbb_dispatcher, $user; + $auth = $this->getMock('\phpbb\auth\auth'); $auth->expects($this->any()) ->method('acl_get') ->with($this->stringContains('_'), $this->anything()) ->will($this->returnValueMap(array( array('u_viewprofile', true), ))); + $phpbb_dispatcher = new phpbb_mock_event_dispatcher; $user->data['user_id'] = ANONYMOUS; $user->lang['GUEST'] = 'Guest'; } @@ -89,11 +94,11 @@ class phpbb_functions_content_get_username_string_test extends phpbb_test_case global $phpbb_root_path, $phpEx; return array( - array(0, '', '', false, false, 'Guest'), - array(ANONYMOUS, 'Anonymous', '', false, false, 'Anonymous'), + array(0, '', '', false, false, '<span class="username">Guest</span>'), + array(ANONYMOUS, 'Anonymous', '', false, false, '<span class="username">Anonymous</span>'), array(2, 'Administrator', 'FF0000', false, false, '<a href="' . $phpbb_root_path . 'memberlist.' . $phpEx . '?mode=viewprofile&u=2" style="color: #FF0000;" class="username-coloured">Administrator</a>'), - array(5, 'User5', '', false, 'http://www.example.org/user.php?mode=show', '<a href="http://www.example.org/user.php?mode=show&u=5">User5</a>'), - array(8, 'Eight', '', false, false, '<a href="' . $phpbb_root_path . 'memberlist.php?mode=viewprofile&u=8">Eight</a>'), + array(5, 'User5', '', false, 'http://www.example.org/user.php?mode=show', '<a href="http://www.example.org/user.php?mode=show&u=5" class="username">User5</a>'), + array(8, 'Eight', '', false, false, '<a href="' . $phpbb_root_path . 'memberlist.php?mode=viewprofile&u=8" class="username">Eight</a>'), ); } @@ -108,10 +113,10 @@ class phpbb_functions_content_get_username_string_test extends phpbb_test_case public function get_username_string_no_profile_data() { return array( - array(ANONYMOUS, 'Anonymous', '', false, false, 'Anonymous'), - array(ANONYMOUS, 'Anonymous', '', '', false, 'Guest'), + array(ANONYMOUS, 'Anonymous', '', false, false, '<span class="username">Anonymous</span>'), + array(ANONYMOUS, 'Anonymous', '', '', false, '<span class="username">Guest</span>'), array(2, 'Administrator', 'FF0000', false, false, '<span style="color: #FF0000;" class="username-coloured">Administrator</span>'), - array(8, 'Eight', '', false, false, 'Eight'), + array(8, 'Eight', '', false, false, '<span class="username">Eight</span>'), ); } diff --git a/tests/functions_content/phpbb_clean_search_string_test.php b/tests/functions_content/phpbb_clean_search_string_test.php index de642c9040..abd107097c 100644 --- a/tests/functions_content/phpbb_clean_search_string_test.php +++ b/tests/functions_content/phpbb_clean_search_string_test.php @@ -1,9 +1,13 @@ <?php /** * -* @package testing -* @copyright (c) 2014 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. * */ |