From: Reini U. <ru...@us...> - 2004-07-08 15:22:28
|
Update of /cvsroot/phpwiki/phpwiki/tests/unit/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9573/lib Modified Files: SetupWiki.php Log Message: added testImportOldMarkup Index: SetupWiki.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/tests/unit/lib/SetupWiki.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -2 -b -p -d -r1.2 -r1.3 --- SetupWiki.php 8 Jul 2004 13:48:08 -0000 1.2 +++ SetupWiki.php 8 Jul 2004 15:22:17 -0000 1.3 @@ -8,18 +8,33 @@ require_once 'PHPUnit.php'; class SetupWiki extends PHPUnit_TestCase { - // constructor of the test suite function SetupWiki($name) { $this->PHPUnit_TestCase($name); } + function testImportOldMarkup() { + global $request; + $dbi = $request->getDbh(); + $pagename = 'OldMarkupTestPage'; + $dbi->deletePage($pagename); + $this->assertFalse($dbi->isWikiPage($pagename)); + + $request->setArg('source', FindFile('pgsrc/'.$pagename)); + $request->setArg('overwrite', 1); + LoadAny($request, $request->getArg('source')); + $this->assertTrue($dbi->isWikiPage($pagename)); + } + function testSetupWiki() { global $request; + $dbi = $request->getDbh(); + $dbi->deletePage('HomePage'); + $this->assertFalse($dbi->isWikiPage('HomePage')); + $request->setArg('source', FindFile('pgsrc')); $request->setArg('overwrite', 1); LoadAny($request, $request->getArg('source')); - $dbh = $request->getDbh(); - $this->assertTrue($dbh->isWikiPage('HomePage')); + $this->assertTrue($dbi->isWikiPage('HomePage')); } } |