3 require_once 'lib/WikiPlugin.php';
4 require_once 'lib/plugin/ListPages.php';
5 require_once 'PHPUnit.php';
7 class ListPagesTest extends PHPUnit_TestCase {
8 // constructor of the test suite
9 function ListPagesTest($name) {
10 $this->PHPUnit_TestCase($name);
14 * Test that we can instantiate and run ListPages plugin without error.
16 function testListPages() {
19 $lp = new WikiPlugin_ListPages();
20 $this->assertEquals("ListPages", $lp->getName());
21 $result = $lp->run($request->getDbh(), "pages=foo", $request);
22 $this->assertType('object',$result,'isa PageList');
23 $this->assertEquals(1, $result->getTotal());
24 $this->assertEquals(3, $result->_maxlen);