diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2013-04-30 22:19:35 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2013-04-30 22:19:35 +0200 |
commit | d7787682df0474b7bb78434339f8edde3727c580 (patch) | |
tree | f560b0b16dced1d1669e3bed3cd59c3e4f8f40a6 /tests/tree/nestedset_forum_insert_delete_test.php | |
parent | 6a7378ecbdeea1ad356cbde8a085aa7510c61788 (diff) | |
download | forums-d7787682df0474b7bb78434339f8edde3727c580.tar forums-d7787682df0474b7bb78434339f8edde3727c580.tar.gz forums-d7787682df0474b7bb78434339f8edde3727c580.tar.bz2 forums-d7787682df0474b7bb78434339f8edde3727c580.tar.xz forums-d7787682df0474b7bb78434339f8edde3727c580.zip |
[ticket/11495] Throw exception when item that should be deleted does not exist
PHPBB3-11495
Diffstat (limited to 'tests/tree/nestedset_forum_insert_delete_test.php')
-rw-r--r-- | tests/tree/nestedset_forum_insert_delete_test.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/tree/nestedset_forum_insert_delete_test.php b/tests/tree/nestedset_forum_insert_delete_test.php index 1f901c7422..d0e9e02c2e 100644 --- a/tests/tree/nestedset_forum_insert_delete_test.php +++ b/tests/tree/nestedset_forum_insert_delete_test.php @@ -52,6 +52,25 @@ class phpbb_tests_tree_nestedset_forum_add_remove_test extends phpbb_tests_tree_ $this->assertEquals($expected, $this->db->sql_fetchrowset($result)); } + public function delete_throws_data() + { + return array( + array('Not an item', 0), + array('Item does not exist', 200), + ); + } + + /** + * @dataProvider delete_throws_data + * + * @expectedException OutOfBoundsException + * @expectedExceptionMessage FORUM_NESTEDSET_INVALID_ITEM + */ + public function test_delete_throws($explain, $forum_id) + { + $this->set->delete($forum_id); + } + public function insert_data() { return array( |