aboutsummaryrefslogtreecommitdiffstats
path: root/tests/mock/auth_provider.php
blob: cca7865fa28b66afa4242c50a6ce65e32cf05e11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
/**
 *
 * @package testing
 * @copyright (c) 2013 phpBB Group
 * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
 *
 */

/**
 * Mock provider class with basic functions to help test
 * sessions.
 *
 * See interface here:
 *    includes/auth/provider/interface.php
 */
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($new)
	{
		return array();
	}

	function logout($data, $new_session)
	{
		return null;
	}

	function validate_session($user)
	{
		return null;
	}
}