diff options
author | Marc Alexander <admin@m-a-styles.de> | 2014-05-31 22:43:07 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2014-06-01 21:31:06 +0200 |
commit | 6f5f0d6d8d5d3afcabccaa9da7c64108af5d4ab7 (patch) | |
tree | 3cd8ff3ae639535b97f99f203bc77b8c074ba115 /tests | |
parent | 306beab4cba155a933391c40c75f5dd9c57fd69e (diff) | |
download | forums-6f5f0d6d8d5d3afcabccaa9da7c64108af5d4ab7.tar forums-6f5f0d6d8d5d3afcabccaa9da7c64108af5d4ab7.tar.gz forums-6f5f0d6d8d5d3afcabccaa9da7c64108af5d4ab7.tar.bz2 forums-6f5f0d6d8d5d3afcabccaa9da7c64108af5d4ab7.tar.xz forums-6f5f0d6d8d5d3afcabccaa9da7c64108af5d4ab7.zip |
[ticket/12352] Use custom provider collection for auth providers
Using this custom provider collection, we can properly check whether the
configured auth provider does exist. The method get_provider() has been added
for returning the default auth provider or the standard db auth provider if
the specified one does not exist.
Additionally, the method get_provider() will throw an RuntimeException if
none of the above exist.
PHPBB3-12352
Diffstat (limited to 'tests')
-rw-r--r-- | tests/session/testable_factory.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/session/testable_factory.php b/tests/session/testable_factory.php index 4bd7fa1366..3e25286480 100644 --- a/tests/session/testable_factory.php +++ b/tests/session/testable_factory.php @@ -96,9 +96,11 @@ class phpbb_session_testable_factory 'auth.provider.db', new phpbb_mock_auth_provider() ); + $provider_collection = new \phpbb\auth\provider_collection($phpbb_container, $config); + $provider_collection->add('auth.provider.db'); $phpbb_container->set( 'auth.provider_collection', - array('auth.provider.db' => $phpbb_container->get('auth.provider.db')) + $provider_collection ); $session = new phpbb_mock_session_testable; |