summaryrefslogtreecommitdiff
path: root/test/BridgeTest.php
diff options
context:
space:
mode:
authoruckelman <uckelman@nomic.net>2010-04-22 20:57:20 +0000
committeruckelman <uckelman@nomic.net>2010-04-22 20:57:20 +0000
commit514bc0bd5d84550d7b9c82f3afd6eee76e1748e3 (patch)
treefcdb5c72481743368c133bf673765f8e71487785 /test/BridgeTest.php
parent09fb03a4fb46bc43abdf31835f65ee868c08a697 (diff)
Added unregisterPost().
git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6728 67b53d14-2c14-4ace-a08f-0dab2b34000c
Diffstat (limited to 'test/BridgeTest.php')
-rw-r--r--test/BridgeTest.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/BridgeTest.php b/test/BridgeTest.php
index 6925847..f3d3b48 100644
--- a/test/BridgeTest.php
+++ b/test/BridgeTest.php
@@ -165,6 +165,24 @@ class BridgeTest extends PHPUnit_Framework_TestCase {
}
/**
+ * @dataProvider providerUnregisterPost
+ */
+ public function testUnregisterPost($postId, $ex) {
+ if ($ex) $this->setExpectedException($ex);
+ $bridge = new Bridge($this->db);
+ $bridge->unregisterPost($postId);
+ $this->assertEquals(false, $bridge->getMessageId($postId));
+ }
+
+ public function providerUnregisterMessage() {
+ return array(
+ array(null, 'Exception'),
+ array(1, 'Exception'),
+ array(2, null),
+ );
+ }
+
+ /**
* @dataProvider providerGetDefaultForumId
*/
public function testGetDefaultForumId($list, $expected, $ex) {