diff options
author | uckelman <uckelman@nomic.net> | 2010-03-21 22:18:26 +0000 |
---|---|---|
committer | uckelman <uckelman@nomic.net> | 2010-03-21 22:18:26 +0000 |
commit | 23a2d3251d88061bce9ff02ca426b1e175767d4b (patch) | |
tree | ba7c9a0f8791b946049cec8b2cb827e7c2af5a3f /test | |
parent | 2645db54fe03db5c0ae82fe81717cc53ef28787d (diff) |
Added class encapsulating bridge DB.
git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6628 67b53d14-2c14-4ace-a08f-0dab2b34000c
Diffstat (limited to 'test')
-rw-r--r-- | test/BridgeTest.php | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/test/BridgeTest.php b/test/BridgeTest.php new file mode 100644 index 0000000..3036f2b --- /dev/null +++ b/test/BridgeTest.php @@ -0,0 +1,57 @@ +<?php + +require_once('PHPUnit/Framework.php'); +require_once('src/Bridge.php'); + +class BridgeTest extends PHPUnit_Framework_TestCase { + + /** + * @dataProvider providerGetPostId + */ + public function testGetPostId($message_id, $expected, $ex) { + $bridge = new Bridge(); + if ($ex) $this->setExpectedException($ex); + $this->assertEquals($expected, $bridge->getPostId($message_id)); + } + + public function providerGetPostId() { + return array( + array('bogus', null, 'PHPUnit_Framework_Error'), + ); + } + + /** + * @dataProvider providerRegisterMessage + */ + public function testRegisterMessage($msg, $expected, $ex) { + $this->markTestIncomplete(); +# $bridge = new Bridge(); +# if ($ex) $this->setExpectedException($ex); +# $this->assertEquals($expected, $bridge->registerMessage($msg)); + } + + public function providerRegisterMessage() { + return array( + ); + } + + /** + * @dataProvider providerGetDefaultForumId + */ + public function testGetDefaultForumId($list, $expected, $ex) { + $bridge = new Bridge(); + if ($ex) $this->setExpectedException($ex); + $this->assertEquals($expected, $bridge->getDefaultForumId($list)); + } + + public function providerGetDefaultForumId() { + return array( + array('bogus', null, 'PHPUnit_Framework_Error'), +# array('messages@forums.vassalengine.org', 2, null), + ); + } + + +} + +?> |