diff options
author | uckelman <uckelman@nomic.net> | 2010-04-11 14:40:21 +0000 |
---|---|---|
committer | uckelman <uckelman@nomic.net> | 2010-04-11 14:40:21 +0000 |
commit | aa6e46800975235de41b439f19c455ba51b2039a (patch) | |
tree | 427b650845e4b46dfc8bc818756dd2a39b94f44b /test | |
parent | faee66a2542ab6d309cc96bdf009abcc09318d52 (diff) |
Added postMessage() and forumExists().
git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6648 67b53d14-2c14-4ace-a08f-0dab2b34000c
Diffstat (limited to 'test')
-rw-r--r-- | test/PhpBB3Test.php | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/test/PhpBB3Test.php b/test/PhpBB3Test.php index c86fa5d..b75929f 100644 --- a/test/PhpBB3Test.php +++ b/test/PhpBB3Test.php @@ -76,8 +76,27 @@ EOF; public function providerGetTopicAndForumIds() { return array( - array(0, null, 'PHPUnit_Framework_Error'), + array('bogus', null, 'PHPUnit_Framework_Error'), array(2, array('topic_id' => 2, 'forum_id' => 2), null) ); } + + /** + * @dataProvider providerForumExists + */ + public function testForumExists($forum_id, $expected, $ex) { + if ($ex) $this->setExpectedException($ex); + $run = 'forumExists(' . $forum_id . ')'; + $this->assertEquals($expected, $this->exec_kludge($run)); + } + + public function providerForumExists() { + return array( + array('bogus', null, 'PHPUnit_Framework_Error'), + array(3.5, null 'PHPUnit_Framework_Error'), + array(-1, null 'PHPUnit_Framework_Error'), + array(1, false, null), + array(2, true, null) + ); + } } |