mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[feature/auth-refactor] Test login() for provider_apache
Provides a test for the login() method for provider_apache. Appears to be failing due to an issue with the mock phpBB request class. PHPBB3-9734
This commit is contained in:
parent
e5de05d8db
commit
307dd9777b
1 changed files with 20 additions and 1 deletions
|
@ -47,7 +47,26 @@ class phpbb_auth_provider_apache_test extends phpbb_database_test_case
|
||||||
|
|
||||||
public function test_login()
|
public function test_login()
|
||||||
{
|
{
|
||||||
$this->markTestIncomplete();
|
$username = 'foobar';
|
||||||
|
$password = 'example';
|
||||||
|
|
||||||
|
$this->request->overwrite('PHP_AUTH_USER', $username, phpbb_request_interface::SERVER);
|
||||||
|
$this->request->overwrite('PHP_AUTH_PW', $password, phpbb_request_interface::SERVER);
|
||||||
|
|
||||||
|
$expected = array(
|
||||||
|
'status' => LOGIN_SUCCESS,
|
||||||
|
'error_msg' => false,
|
||||||
|
'user_row' => array(
|
||||||
|
'user_id' => '1',
|
||||||
|
'username' => 'foobar',
|
||||||
|
'user_password' => '$H$9E45lK6J8nLTSm9oJE5aNCSTFK9wqa/',
|
||||||
|
'user_passchg' => '0',
|
||||||
|
'user_email' => 'example@example.com',
|
||||||
|
'user_type' => '0',
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->assertEquals($expected, $this->provider->login($username, $password));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_validate_session()
|
public function test_validate_session()
|
||||||
|
|
Loading…
Add table
Reference in a new issue