1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-09 02:06:32 +02:00

[ticket/217] Silence errors in tests, not code.

Use a mock user object for testing bbcode.

PHPBB3-217
This commit is contained in:
Oleg Pudeyev
2011-06-05 13:23:55 -04:00
committed by rxu
parent d44b6ba5ca
commit 2d1e426ba7
3 changed files with 25 additions and 1 deletions

20
tests/mock_user.php Normal file
View File

@@ -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' => '/');
}