1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-15 05:14:28 +02: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:
Joseph Warner 2013-06-25 14:12:31 -04:00
parent e5de05d8db
commit 307dd9777b

View File

@ -47,7 +47,26 @@ class phpbb_auth_provider_apache_test extends phpbb_database_test_case
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()