summaryrefslogtreecommitdiff
path: root/test/BridgeTest.php
diff options
context:
space:
mode:
authoruckelman <uckelman@nomic.net>2010-04-11 20:24:04 +0000
committeruckelman <uckelman@nomic.net>2010-04-11 20:24:04 +0000
commit892aab166e5060e3c28c26953a62bc4632f3709b (patch)
tree2260d9c5ae5fd00ee08aa1e5bc2d38af81e5f5c3 /test/BridgeTest.php
parenta4d841f15b9119826007555beedd3d97477ec8a6 (diff)
Added unregisterMessage().
git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6679 67b53d14-2c14-4ace-a08f-0dab2b34000c
Diffstat (limited to 'test/BridgeTest.php')
-rw-r--r--test/BridgeTest.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/BridgeTest.php b/test/BridgeTest.php
index 7912327..cc094e6 100644
--- a/test/BridgeTest.php
+++ b/test/BridgeTest.php
@@ -129,6 +129,23 @@ class BridgeTest extends PHPUnit_Framework_TestCase {
}
/**
+ * @dataProvider providerUnregisterMessage
+ */
+ public function testUnregisterMessage($messageId, $expected, $ex) {
+ if ($ex) $this->setExpectedException($ex);
+ $bridge = new Bridge($this->db);
+ $this->assertEquals($expected, $bridge->unregisterMessage($messageId));
+ }
+
+ public function providerUnregisterMessage() {
+ return array(
+ array(null, null, 'Exception'),
+ array('<20100302094228.33F0310091@charybdis.ellipsis.cx>', true, null),
+ array('<10100302094228.33F0310091@charybdis.ellipsis.cx>', false, null)
+ );
+ }
+
+ /**
* @dataProvider providerGetDefaultForumId
*/
public function testGetDefaultForumId($list, $expected, $ex) {