1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-09 02:06:32 +02:00

[ticket/13248] Use auth provider collection for getting provider

PHPBB3-13248
This commit is contained in:
Marc Alexander
2014-10-30 13:58:09 +01:00
parent f3588c66ec
commit 6b057e026c
2 changed files with 27 additions and 3 deletions

View File

@@ -33,6 +33,30 @@ class phpbb_functional_auth_test extends phpbb_functional_test_case
$this->assertContains('anothertestuser', $crawler->filter('#username_logged_in')->text());
}
/**
* @dependsOn test_login_other
*/
public function test_login_ucp_other_auth_provider()
{
global $cache, $config;
$cache = new phpbb_mock_null_cache;
$db = $this->get_db();
$sql = 'UPDATE ' . CONFIG_TABLE . " SET config_value = 'foobar' WHERE config_name = 'auth_method'";
$db->sql_query($sql);
$crawler = self::request('GET', 'ucp.php?mode=login');
$form = $crawler->selectButton('Login')->form();
$form->setValues(array(
'username' => 'anothertestuser',
'password' => str_repeat('anothertestuser', 2),
));
$config['auth_method'] = 'foobar';
$crawler = self::submit($form);
$this->assertContains('anothertestuser', $crawler->filter('#username_logged_in')->text());
$sql = 'UPDATE ' . CONFIG_TABLE . " SET config_value = 'db' WHERE config_name = 'auth_method'";
$db->sql_query($sql);
$config['auth_method'] = 'db';
}
/**
* @depends test_login
*/