summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoruckelman <uckelman@nomic.net>2010-04-30 17:26:15 +0000
committeruckelman <uckelman@nomic.net>2010-04-30 17:26:15 +0000
commit1d718ace9e7c9e65fedca5dc3f7396d41ea44005 (patch)
tree21941afcdb526931a8f40acf76203141e8b66492 /test
parent0e6c8d3fbcd4afd0fb84ee736ff0d3952c713b4e (diff)
Added removePost() for post deletion.
git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6790 67b53d14-2c14-4ace-a08f-0dab2b34000c
Diffstat (limited to 'test')
-rw-r--r--test/BridgeTest.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/BridgeTest.php b/test/BridgeTest.php
index c078aaa..8688af3 100644
--- a/test/BridgeTest.php
+++ b/test/BridgeTest.php
@@ -206,6 +206,23 @@ class BridgeTest extends PHPUnit_Framework_TestCase {
}
/**
+ * @dataProvider providerRemovePost
+ */
+ public function testRemovePost($postId, $ex) {
+ if ($ex) $this->setExpectedException($ex);
+ $bridge = new Bridge($this->db);
+ $bridge->removePost($postId);
+ }
+
+ public function providerRemovePost() {
+ return array(
+ array(null, 'Exception'),
+ array(1, null),
+ array(2, 'Exception')
+ );
+ }
+
+ /**
* @dataProvider providerGetDefaultForumId
*/
public function testGetDefaultForumId($list, $expected, $ex) {