summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoruckelman <uckelman@nomic.net>2010-04-13 22:04:55 +0000
committeruckelman <uckelman@nomic.net>2010-04-13 22:04:55 +0000
commit36a4efb0d72f69a25a14d93c05fc587739915273 (patch)
treec938452a96daeb1c4729e53e3951d03eacf364e5 /test
parentd6a3cc8022b33687200776d0c0ce77bb9502956a (diff)
Added getTopicId().
git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6710 67b53d14-2c14-4ace-a08f-0dab2b34000c
Diffstat (limited to 'test')
-rw-r--r--test/PhpBB3Test.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/PhpBB3Test.php b/test/PhpBB3Test.php
index ee9246a..d43b386 100644
--- a/test/PhpBB3Test.php
+++ b/test/PhpBB3Test.php
@@ -67,6 +67,23 @@ EOF;
}
/**
+ * @dataProvider providerGetTopicId
+ */
+ public function testGetTopicId($post_id, $expected, $ex) {
+ if ($ex) $this->setExpectedException($ex);
+ $run = 'getTopicId(' . $post_id . ')';
+ $this->assertEquals($expected, $this->exec_kludge($run));
+ }
+
+ public function providerGetTopicId() {
+ return array(
+ array(null, null, 'Exception'),
+ array('bogus', false, null),
+ array(2, 2, null)
+ );
+ }
+
+ /**
* @dataProvider providerGetTopicAndForumIds
*/
public function testGetTopicAndForumIds($post_id, $expected, $ex) {