diff options
author | Joseph Warner <hardolaf@hardolaf.com> | 2013-07-11 18:35:41 -0400 |
---|---|---|
committer | Joseph Warner <hardolaf@hardolaf.com> | 2013-07-11 18:36:09 -0400 |
commit | e5f1e0f98471f5b757c22b85bf38be4d505c4f72 (patch) | |
tree | e974674dceed20b533b25a0fdb3a11c777291ce8 /tests/acp_board | |
parent | 4bd676e4aedd6bc0737781a61bbc6d8dc0b26809 (diff) | |
download | forums-e5f1e0f98471f5b757c22b85bf38be4d505c4f72.tar forums-e5f1e0f98471f5b757c22b85bf38be4d505c4f72.tar.gz forums-e5f1e0f98471f5b757c22b85bf38be4d505c4f72.tar.bz2 forums-e5f1e0f98471f5b757c22b85bf38be4d505c4f72.tar.xz forums-e5f1e0f98471f5b757c22b85bf38be4d505c4f72.zip |
[feature/auth-refactor] DataProvider for acp_board test
PHPBB3-9734
Diffstat (limited to 'tests/acp_board')
-rw-r--r-- | tests/acp_board/select_auth_method_test.php | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/tests/acp_board/select_auth_method_test.php b/tests/acp_board/select_auth_method_test.php index d93522d93a..2172436aa2 100644 --- a/tests/acp_board/select_auth_method_test.php +++ b/tests/acp_board/select_auth_method_test.php @@ -11,9 +11,20 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/acp/acp_board.php'; require_once dirname(__FILE__) . '/auth_provider/invalid.php'; require_once dirname(__FILE__) . '/auth_provider/valid.php'; -class phpbb_acp_board_select_auth_method_test extends PHPUnit_Framework_TestCase +class phpbb_acp_board_select_auth_method_test extends phpbb_test_case { - public function test_invalid_provider() + public static function function_return() + { + return array( + array('acp_board_valid', '<option value="acp_board_valid" selected="selected">Acp_board_valid</option>'), + array('acp_board_invalid', '<option value="acp_board_valid">Acp_board_valid</option>'), + ); + } + + /** + * @dataProvider function_return + */ + public function test_invalid_provider($selected, $expected) { global $phpbb_container; $phpbb_container = new phpbb_mock_container_builder(); @@ -25,10 +36,6 @@ class phpbb_acp_board_select_auth_method_test extends PHPUnit_Framework_TestCase $acp_board = new acp_board(); - $expected = '<option value="acp_board_valid" selected="selected">Acp_board_valid</option>'; - $this->assertEquals($expected, $acp_board->select_auth_method('acp_board_valid')); - - $expected = '<option value="acp_board_valid">Acp_board_valid</option>'; - $this->assertEquals($expected, $acp_board->select_auth_method('acp_board_invalid')); + $this->assertEquals($expected, $acp_board->select_auth_method($selected)); } } |