aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functional
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2014-10-30 13:58:09 +0100
committerMarc Alexander <admin@m-a-styles.de>2014-11-01 21:54:06 +0100
commit6b057e026cfb9603c6260d619e0a37e3679aa0d5 (patch)
tree451b790fca760baa5d29fcd6068e135ca8d9a56e /tests/functional
parentf3588c66ec22b71e779da1497a690802e1c6b51a (diff)
downloadforums-6b057e026cfb9603c6260d619e0a37e3679aa0d5.tar
forums-6b057e026cfb9603c6260d619e0a37e3679aa0d5.tar.gz
forums-6b057e026cfb9603c6260d619e0a37e3679aa0d5.tar.bz2
forums-6b057e026cfb9603c6260d619e0a37e3679aa0d5.tar.xz
forums-6b057e026cfb9603c6260d619e0a37e3679aa0d5.zip
[ticket/13248] Use auth provider collection for getting provider
PHPBB3-13248
Diffstat (limited to 'tests/functional')
-rw-r--r--tests/functional/auth_test.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/functional/auth_test.php b/tests/functional/auth_test.php
index b4b4279bf1..1794afd009 100644
--- a/tests/functional/auth_test.php
+++ b/tests/functional/auth_test.php
@@ -34,6 +34,30 @@ class phpbb_functional_auth_test extends phpbb_functional_test_case
}
/**
+ * @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
*/
public function test_logout()