summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoruckelman <uckelman@nomic.net>2010-04-11 15:35:25 +0000
committeruckelman <uckelman@nomic.net>2010-04-11 15:35:25 +0000
commitbae4e7aa3345ca56dd86ca5fb84abbde8ae5383b (patch)
tree9e5e3f2af57911b11df2bc2a5c76cae4476764d3 /test
parent66be33480a0b891106ab3e8a75420843f36f6665 (diff)
Added topicExists().
git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6655 67b53d14-2c14-4ace-a08f-0dab2b34000c
Diffstat (limited to 'test')
-rw-r--r--test/PhpBB3Test.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/PhpBB3Test.php b/test/PhpBB3Test.php
index a853b8b..1ff9b88 100644
--- a/test/PhpBB3Test.php
+++ b/test/PhpBB3Test.php
@@ -99,4 +99,23 @@ EOF;
array(2, true, null)
);
}
+
+ /**
+ * @dataProvider providerTopicExists
+ */
+ public function testTopicExists($topic_id, $expected, $ex) {
+ if ($ex) $this->setExpectedException($ex);
+ $run = 'topicExists(' . $topic_id . ')';
+ $this->assertEquals($expected, $this->exec_kludge($run));
+ }
+
+ public function providerTopicExists() {
+ return array(
+ array('bogus', null, 'PHPUnit_Framework_Error'),
+ array(3.5, null, 'PHPUnit_Framework_Error'),
+ array(-1, null, 'PHPUnit_Framework_Error'),
+ array(0, false, null),
+ array(1, true, null)
+ );
+ }
}