From c17f8a5d373e103fd397766358e3ff7fc3891192 Mon Sep 17 00:00:00 2001 From: Joseph Warner Date: Thu, 11 Jul 2013 18:15:22 -0400 Subject: [PATCH] [feature/auth-refactor] Test that acp_board excludes invalid providers PHPBB3-9734 --- tests/acp_board/select_auth_method_test.php | 43 +++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 tests/acp_board/select_auth_method_test.php diff --git a/tests/acp_board/select_auth_method_test.php b/tests/acp_board/select_auth_method_test.php new file mode 100644 index 0000000000..f81cf19db3 --- /dev/null +++ b/tests/acp_board/select_auth_method_test.php @@ -0,0 +1,43 @@ +set('auth.provider_collection', array( + 'auth.provider.acp_board_valid' => new phpbb_auth_provider_acp_board_valid, + 'auth.provider.acp_board_invalid' => new phpbb_auth_provider_acp_board_invalid, + ) + ); + + $acp_board = new acp_board(); + + $expected = ''; + $this->assertEquals($expected, $acp_board->select_auth_method('acp_board_valid')); + } +} + +class phpbb_auth_provider_acp_board_valid extends phpbb_auth_provider_base +{ + public function login($username, $password) + { + return; + } +} + +class phpbb_auth_provider_acp_board_invalid +{ + +}