summaryrefslogtreecommitdiff
path: root/test/PhpBB3Test.php
diff options
context:
space:
mode:
Diffstat (limited to 'test/PhpBB3Test.php')
-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) {