diff options
Diffstat (limited to 'tests/mock')
-rw-r--r-- | tests/mock/auth_provider.php | 23 | ||||
-rw-r--r-- | tests/mock/request.php | 5 | ||||
-rw-r--r-- | tests/mock/session_testable.php | 4 |
3 files changed, 32 insertions, 0 deletions
diff --git a/tests/mock/auth_provider.php b/tests/mock/auth_provider.php new file mode 100644 index 0000000000..a576ef6b67 --- /dev/null +++ b/tests/mock/auth_provider.php @@ -0,0 +1,23 @@ +<?php +/** + * + * @package testing + * @copyright (c) 2013 phpBB Group + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 + * + */ + +/** + * Mock auth provider class with basic functions to help test sessions. + */ +class phpbb_mock_auth_provider extends phpbb_auth_provider_base +{ + public function login($username, $password) + { + return array( + 'status' => "", + 'error_msg' => "", + 'user_row' => "", + ); + } +} diff --git a/tests/mock/request.php b/tests/mock/request.php index b71361e33e..ed0744c8cf 100644 --- a/tests/mock/request.php +++ b/tests/mock/request.php @@ -74,6 +74,11 @@ class phpbb_mock_request implements \phpbb\request\request_interface return array_keys($this->data[$super_global]); } + public function get_super_global($super_global = phpbb_request_interface::REQUEST) + { + return $this->data[$super_global]; + } + /* custom methods */ public function set_header($header_name, $value) diff --git a/tests/mock/session_testable.php b/tests/mock/session_testable.php index 38e66ec67a..d81ae3163e 100644 --- a/tests/mock/session_testable.php +++ b/tests/mock/session_testable.php @@ -58,5 +58,9 @@ class phpbb_mock_session_testable extends \phpbb\session } } } + + public function setup() + { + } } |