From 6100be95b7de486dc07bcb5a2ccd58a62d01a9f6 Mon Sep 17 00:00:00 2001 From: uckelman Date: Sat, 10 Apr 2010 14:36:56 +0000 Subject: Fixed registerMessage(). git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6636 67b53d14-2c14-4ace-a08f-0dab2b34000c --- test/BridgeTest.php | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'test') 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, + ) ); } -- cgit v1.2.3