diff options
| author | Joseph Warner <hardolaf@hardolaf.com> | 2013-06-25 14:12:31 -0400 |
|---|---|---|
| committer | Joseph Warner <hardolaf@hardolaf.com> | 2013-06-25 14:13:36 -0400 |
| commit | 307dd9777b67e8a7628bb74eeba8cc55ab6a8f58 (patch) | |
| tree | aadd6a87dc292b5826ddfc4341b01fd8127e5b38 /tests | |
| parent | e5de05d8dbbcf0a38aa5c1c2a872765b163ccb31 (diff) | |
| download | forums-307dd9777b67e8a7628bb74eeba8cc55ab6a8f58.tar forums-307dd9777b67e8a7628bb74eeba8cc55ab6a8f58.tar.gz forums-307dd9777b67e8a7628bb74eeba8cc55ab6a8f58.tar.bz2 forums-307dd9777b67e8a7628bb74eeba8cc55ab6a8f58.tar.xz forums-307dd9777b67e8a7628bb74eeba8cc55ab6a8f58.zip | |
[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
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/auth/provider_apache_test.php | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/tests/auth/provider_apache_test.php b/tests/auth/provider_apache_test.php index 1530dcb746..4773e4fdc3 100644 --- a/tests/auth/provider_apache_test.php +++ b/tests/auth/provider_apache_test.php @@ -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() |
