mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/11620] Rename provider -> mock_auth_provider
Rename the class and file name to better match what the class is mocking, as well as implement the interface of that class. PHPBB3-11620
This commit is contained in:
53
tests/mock/auth_provider.php
Normal file
53
tests/mock/auth_provider.php
Normal file
@@ -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 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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user