diff options
author | Oleg Pudeyev <oleg@bsdpower.com> | 2011-06-05 13:23:55 -0400 |
---|---|---|
committer | rxu <rxu@mail.ru> | 2011-06-06 21:14:10 +0800 |
commit | 2d1e426ba745fa5b0b7666e5fe4a5fee97caccd7 (patch) | |
tree | d848e98b7d5cfd7a71b7af0584336b4fb5c52460 /tests/bbcode/url_bbcode_test.php | |
parent | d44b6ba5caeafe220b4959a6de99d035fe10b4f1 (diff) | |
download | forums-2d1e426ba745fa5b0b7666e5fe4a5fee97caccd7.tar forums-2d1e426ba745fa5b0b7666e5fe4a5fee97caccd7.tar.gz forums-2d1e426ba745fa5b0b7666e5fe4a5fee97caccd7.tar.bz2 forums-2d1e426ba745fa5b0b7666e5fe4a5fee97caccd7.tar.xz forums-2d1e426ba745fa5b0b7666e5fe4a5fee97caccd7.zip |
[ticket/217] Silence errors in tests, not code.
Use a mock user object for testing bbcode.
PHPBB3-217
Diffstat (limited to 'tests/bbcode/url_bbcode_test.php')
-rw-r--r-- | tests/bbcode/url_bbcode_test.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/bbcode/url_bbcode_test.php b/tests/bbcode/url_bbcode_test.php index 597933c6f8..7bbf731c74 100644 --- a/tests/bbcode/url_bbcode_test.php +++ b/tests/bbcode/url_bbcode_test.php @@ -11,6 +11,7 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; require_once dirname(__FILE__) . '/../../phpBB/includes/functions_content.php'; require_once dirname(__FILE__) . '/../../phpBB/includes/bbcode.php'; require_once dirname(__FILE__) . '/../../phpBB/includes/message_parser.php'; +require_once dirname(__FILE__) . '/../mock_user.php'; class phpbb_url_bbcode_test extends phpbb_test_case { @@ -30,6 +31,9 @@ class phpbb_url_bbcode_test extends phpbb_test_case */ public function test_url($message) { + global $user; + $user = new phpbb_mock_user; + $bbcode = new bbcode_firstpass(); $bbcode->message = $message; $bbcode->bbcode_init(false); |