From aa6e46800975235de41b439f19c455ba51b2039a Mon Sep 17 00:00:00 2001 From: uckelman Date: Sun, 11 Apr 2010 14:40:21 +0000 Subject: Added postMessage() and forumExists(). git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6648 67b53d14-2c14-4ace-a08f-0dab2b34000c --- test/PhpBB3Test.php | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'test/PhpBB3Test.php') 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) + ); + } } -- cgit v1.2.3