summaryrefslogtreecommitdiff
path: root/test/BridgeTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'test/BridgeTest.php')
-rw-r--r--test/BridgeTest.php28
1 files changed, 23 insertions, 5 deletions
diff --git a/test/BridgeTest.php b/test/BridgeTest.php
index c7f6f47..b90ae02 100644
--- a/test/BridgeTest.php
+++ b/test/BridgeTest.php
@@ -96,15 +96,33 @@ class BridgeTest extends PHPUnit_Framework_TestCase {
/**
* @dataProvider providerRegisterMessage
*/
- public function testRegisterMessage($msg, $expected, $ex) {
- $this->markTestIncomplete();
-# $bridge = new Bridge($this->db);
-# if ($ex) $this->setExpectedException($ex);
-# $this->assertEquals($expected, $bridge->registerMessage($msg));
+ public function testRegisterMessage($postId, $messageId, $inReplyTo, $refs,
+ $expected, $ex) {
+ if ($ex) $this->setExpectedException($ex);
+ $bridge = new Bridge($this->db);
+ $bridge->registerMessage($postId, $messageId, $inReplyTo, $refs);
}
public function providerRegisterMessage() {
return array(
+ array('bogus', null, null, null, null, 'PDOException'),
+ array(1, '', '', '', null, 'PDOException'),
+ array(
+ 2,
+ '<20100302094228.33F0310091@charybdis.ellipsis.cx>',
+ null,
+ null,
+ null,
+ 'PDOException'
+ ),
+ array(
+ 2,
+ '<10100302094228.33F0310091@charybdis.ellipsis.cx>',
+ null,
+ null,
+ null,
+ null,
+ )
);
}