From: Reini U. <ru...@us...> - 2004-07-06 09:15:32
|
Update of /cvsroot/phpwiki/phpwiki/tests/unit/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23978/lib Added Files: DumpHtml.php SetupWiki.php Log Message: cache groups, added load and save tests (all pgsrc files must be able to be transformed) --- NEW FILE: DumpHtml.php --- <?php /** * Check if all pages can be rendered (dumped) */ require_once 'lib/loadsave.php'; require_once 'PHPUnit.php'; class DumpHtml extends PHPUnit_TestCase { // constructor of the test suite function DumpHtml($name) { $this->PHPUnit_TestCase($name); } function testDumpHtml() { global $request; $request->setArg('directory','.dumphtml'); DumpHtmlToDir($request); //$this->assertEquals(2, $pl->getTotal(), "count 2"); } } ?> --- NEW FILE: SetupWiki.php --- <?php /** * Check if all pgsrc files import without failure */ require_once 'lib/loadsave.php'; require_once 'PHPUnit.php'; class SetupWiki extends PHPUnit_TestCase { // constructor of the test suite function SetupWiki($name) { $this->PHPUnit_TestCase($name); } function testSetupWiki() { global $request; $request->setArg('source', FindFile('pgsrc')); $request->setArg('overwrite', 1); LoadAny($request, $request->getArg('source')); $dbh = $request->getDbh(); $this->assertTrue($dbh->isWikiPage('HomePage')); } } ?> |