aboutsummaryrefslogtreecommitdiffstats
path: root/tests/acp_board/select_auth_method_test.php
diff options
context:
space:
mode:
authorJoseph Warner <hardolaf@hardolaf.com>2013-07-11 18:47:42 -0400
committerJoseph Warner <hardolaf@hardolaf.com>2013-07-11 18:49:56 -0400
commit79f0866b781853769c561138bc1a5646a9287b81 (patch)
tree26c3f207bec708620262a95ef6017a22854af648 /tests/acp_board/select_auth_method_test.php
parente5f1e0f98471f5b757c22b85bf38be4d505c4f72 (diff)
downloadforums-79f0866b781853769c561138bc1a5646a9287b81.tar
forums-79f0866b781853769c561138bc1a5646a9287b81.tar.gz
forums-79f0866b781853769c561138bc1a5646a9287b81.tar.bz2
forums-79f0866b781853769c561138bc1a5646a9287b81.tar.xz
forums-79f0866b781853769c561138bc1a5646a9287b81.zip
[feature/auth-refactor] Changes
PHPBB3-9734
Diffstat (limited to 'tests/acp_board/select_auth_method_test.php')
-rw-r--r--tests/acp_board/select_auth_method_test.php19
1 files changed, 12 insertions, 7 deletions
diff --git a/tests/acp_board/select_auth_method_test.php b/tests/acp_board/select_auth_method_test.php
index 2172436aa2..34ca013824 100644
--- a/tests/acp_board/select_auth_method_test.php
+++ b/tests/acp_board/select_auth_method_test.php
@@ -13,7 +13,9 @@ require_once dirname(__FILE__) . '/auth_provider/valid.php';
class phpbb_acp_board_select_auth_method_test extends phpbb_test_case
{
- public static function function_return()
+ protected $acp_board;
+
+ public static function select_auth_method_data()
{
return array(
array('acp_board_valid', '<option value="acp_board_valid" selected="selected">Acp_board_valid</option>'),
@@ -21,10 +23,7 @@ class phpbb_acp_board_select_auth_method_test extends phpbb_test_case
);
}
- /**
- * @dataProvider function_return
- */
- public function test_invalid_provider($selected, $expected)
+ public function setUp()
{
global $phpbb_container;
$phpbb_container = new phpbb_mock_container_builder();
@@ -34,8 +33,14 @@ class phpbb_acp_board_select_auth_method_test extends phpbb_test_case
'auth.provider.acp_board_invalid' => new phpbb_auth_provider_acp_board_invalid,
));
- $acp_board = new acp_board();
+ $this->acp_board = new acp_board();
+ }
- $this->assertEquals($expected, $acp_board->select_auth_method($selected));
+ /**
+ * @dataProvider select_auth_method_data
+ */
+ public function test_select_auth_method($selected, $expected)
+ {
+ $this->assertEquals($expected, $this->acp_board->select_auth_method($selected));
}
}