diff options
Diffstat (limited to 'tests/mock')
-rw-r--r-- | tests/mock/auth_provider.php | 53 | ||||
-rw-r--r-- | tests/mock/session_testable.php | 4 |
2 files changed, 57 insertions, 0 deletions
diff --git a/tests/mock/auth_provider.php b/tests/mock/auth_provider.php new file mode 100644 index 0000000000..e0a2abd2d5 --- /dev/null +++ b/tests/mock/auth_provider.php @@ -0,0 +1,53 @@ +<?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 implements phpbb_auth_provider_interface +{ + function init() + { + return null; + } + + function login($username, $password) + { + return array( + 'status' => "", + 'error_msg' => "", + 'user_row' => "", + ); + } + + function autologin() + { + return array(); + } + + function acp() + { + return array(); + } + + function logout($data, $new_session) + { + return null; + } + + function validate_session($user) + { + return null; + } + + public function get_acp_template($new_config) + { + return null; + } +} diff --git a/tests/mock/session_testable.php b/tests/mock/session_testable.php index 56ff8c8b32..283f9af192 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() + { + } } |