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/mock_user.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/mock_user.php')
| -rw-r--r-- | tests/mock_user.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/mock_user.php b/tests/mock_user.php new file mode 100644 index 0000000000..74d31c4c4a --- /dev/null +++ b/tests/mock_user.php @@ -0,0 +1,20 @@ +<?php +/** +* +* @package testing +* @copyright (c) 2011 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* Mock user class. +* This class is used when tests invoke phpBB code expecting to have a global +* user object, to avoid instantiating the actual user object. +* It has a minimum amount of functionality, just to make tests work. +*/ +class phpbb_mock_user +{ + public $host = "testhost"; + public $page = array('root_script_path' => '/'); +} |
