diff options
Diffstat (limited to 'tests/groupposition/legend_test.php')
-rw-r--r-- | tests/groupposition/legend_test.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/groupposition/legend_test.php b/tests/groupposition/legend_test.php index 229654a6b8..16e33b390c 100644 --- a/tests/groupposition/legend_test.php +++ b/tests/groupposition/legend_test.php @@ -18,15 +18,16 @@ class phpbb_groupposition_legend_test extends phpbb_database_test_case public function get_group_value_data() { return array( - array(1, 0), - array(3, 2), + array(1, 0, ''), + array(3, 2, ''), + array(4, 0, 'phpbb_groupposition_exception'), ); } /** * @dataProvider get_group_value_data */ - public function test_get_group_value($group_id, $expected) + public function test_get_group_value($group_id, $expected, $throws_exception) { global $cache; @@ -35,6 +36,11 @@ class phpbb_groupposition_legend_test extends phpbb_database_test_case $user = new phpbb_user; $user->lang = array(); + if ($throws_exception) + { + $this->setExpectedException($throws_exception); + } + $test_class = new phpbb_groupposition_legend($db, $user); $this->assertEquals($expected, $test_class->get_group_value($group_id)); } |