aboutsummaryrefslogtreecommitdiffstats
path: root/tests/mock_user.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mock_user.php')
-rw-r--r--tests/mock_user.php20
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' => '/');
+}