]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - tests/unit/lib/plugin/OrphanedPagesTest.php
Make calls to plugins more correct to satisfy new picky unit tests
[SourceForge/phpwiki.git] / tests / unit / lib / plugin / OrphanedPagesTest.php
1 <?php
2
3 require_once 'lib/WikiPlugin.php';
4 require_once 'lib/plugin/OrphanedPages.php';
5 require_once 'PHPUnit.php';
6
7 class OrphanedPagesTest extends PHPUnit_TestCase {
8     // constructor of the test suite
9     function OrphanedPagesTest($name) {
10        $this->PHPUnit_TestCase($name);
11     }
12
13     /**
14      * Test that we can instantiate and run OrphanedPages plugin without error.
15      */
16     function testOrphanedPages() {
17         global $request;
18
19         $lp = new WikiPlugin_OrphanedPages();
20         $this->assertEquals("OrphanedPages", $lp->getName());
21         $basepage = "";
22         $args = "";
23         $result = $lp->run($request->getDbh(), $args, $request, $basepage);
24         $this->assertType('object',$result,'isa PageList');
25     }
26 }
27
28
29 ?>