aboutsummaryrefslogtreecommitdiffstats
path: root/tests/acp_board
diff options
context:
space:
mode:
authorJoseph Warner <hardolaf@hardolaf.com>2013-07-11 18:35:41 -0400
committerJoseph Warner <hardolaf@hardolaf.com>2013-07-11 18:36:09 -0400
commite5f1e0f98471f5b757c22b85bf38be4d505c4f72 (patch)
treee974674dceed20b533b25a0fdb3a11c777291ce8 /tests/acp_board
parent4bd676e4aedd6bc0737781a61bbc6d8dc0b26809 (diff)
downloadforums-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.php21
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));
}
}