From: Dan F. <dfr...@cs...> - 2004-07-06 18:27:06
|
Reini, Thanks for checking in more unit tests! I hope this will be a convenient way to check over time that things haven't broken. Question: how do you get this latest test to pass? When I run the unit tests, I now get the following: % php test.php Run tests .. /scratch/gibson/apache2/doc/dfrankow/phpwiki-next/lib/WikiDB/backend/file.php: 97: error# 2: fopen(/scratch/gibson/apache2/doc/dfrankow/phpwiki-next/tests/unit/testbox/page_data/AddCommentPlugin): failed to open stream: No such file or directory Traceback: /scratch/gibson/apache2/doc/dfrankow/phpwiki-next/lib/WikiDB/backend/file.php:97 /scratch/gibson/apache2/doc/dfrankow/phpwiki-next/lib/WikiDB/backend/file.php:187 /scratch/gibson/apache2/doc/dfrankow/phpwiki-next/lib/WikiDB/backend/file.php:275 /scratch/gibson/apache2/doc/dfrankow/phpwiki-next/lib/WikiDB.php:1773 /scratch/gibson/apache2/doc/dfrankow/phpwiki-next/lib/WikiDB.php:1112 /scratch/gibson/apache2/doc/dfrankow/phpwiki-next/lib/loadsave.php:626 /scratch/gibson/apache2/doc/dfrankow/phpwiki-next/lib/loadsave.php:873 /scratch/gibson/apache2/doc/dfrankow/phpwiki-next/lib/loadsave.php:934 /scratch/gibson/apache2/doc/dfrankow/phpwiki-next/lib/loadsave.php:1020 /scratch/gibson/apache2/doc/dfrankow/phpwiki-next/tests/unit/lib/SetupWiki.php:21 /export/scratch/apache/2.0.46/php/lib/php/PHPUnit/TestCase.php:155 /export/scratch/apache/2.0.46/php/lib/php/PHPUnit/TestCase.php:139 /export/scratch/apache/2.0.46/php/lib/php/PHPUnit/TestResult.php:207 /export/scratch/apache/2.0.46/php/lib/php/PHPUnit/TestCase.php:127 /export/scratch/apache/2.0.46/php/lib/php/PHPUnit/TestSuite.php:141 /export/scratch/apache/2.0.46/php/lib/php/PHPUnit/TestSuite.php:141 /export/scratch/apache/2.0.46/php/lib/php/PHPUnit.php:71 /scratch/gibson/apache2/doc/dfrankow/phpwiki-next/tests/unit/test.php:212 I poked into this a little bit. It looks like before saving page, it tries to check the page metadata, doesn't file the page (file), and throws an error. Is there some setup option I am missing? Thanks for your attention. Dan Reini Urban wrote: >Update of /cvsroot/phpwiki/phpwiki/tests/unit >In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23978 > >Modified Files: > test.php >Log Message: >cache groups, added load and save tests > (all pgsrc files must be able to be transformed) > > >Index: test.php >=================================================================== >RCS file: /cvsroot/phpwiki/phpwiki/tests/unit/test.php,v >retrieving revision 1.5 >retrieving revision 1.6 >diff -u -2 -b -p -d -r1.5 -r1.6 >--- test.php 1 Jul 2004 15:38:39 -0000 1.5 >+++ test.php 6 Jul 2004 09:15:23 -0000 1.6 >@@ -1,3 +1,4 @@ >-<?php // #! /usr/local/bin/php -Cq >+#! /usr/local/bin/php -Cq >+<?php > /* Copyright (C) 2004, Dan Frankowski <dfr...@cs...> > * Copyright (C) 2004, Reini Urban <ru...@x-...> >@@ -43,4 +44,5 @@ ini_set('include_path', ini_get('include > # This quiets a warning in config.php > $HTTP_SERVER_VARS['REMOTE_ADDR'] = '127.0.0.1'; >+define('GROUP_METHOD', 'NONE'); > > # Other needed files >@@ -122,4 +124,5 @@ class MockRequest { > $this->_dbi = WikiDB::open($dbparams); > $this->_user = new MockUser("a_user", true); >+ $this->_group = WikiGroup::getGroup(); > $this->_args = array('pagename' => 'HomePage', 'action' => 'browse'); > //$this->Request(); >@@ -159,5 +162,5 @@ class MockRequest { > } > function getGroup() { >- return WikiGroup::getGroup(); >+ return $this->_group; > } > } >@@ -185,5 +188,7 @@ require_once 'PHPUnit.php'; > # lib/config.php might do a cwd() > require_once dirname(__FILE__).'/lib/InlineParserTest.php'; >+require_once dirname(__FILE__).'/lib/SetupWiki.php'; > require_once dirname(__FILE__).'/lib/PageListTest.php'; >+require_once dirname(__FILE__).'/lib/DumpHtml.php'; > require_once dirname(__FILE__).'/lib/plugin/ListPagesTest.php'; > require_once dirname(__FILE__).'/lib/plugin/AllPagesTest.php'; >@@ -200,4 +205,6 @@ $suite->addTest( new PHPUnit_TestSuite(" > $suite->addTest( new PHPUnit_TestSuite("PageListTest") ); > $suite->addTest( new PHPUnit_TestSuite("ListPagesTest") ); >+$suite->addTest( new PHPUnit_TestSuite("SetupWiki") ); >+$suite->addTest( new PHPUnit_TestSuite("DumpHtml") ); > $suite->addTest( new PHPUnit_TestSuite("AllPagesTest") ); > $suite->addTest( new PHPUnit_TestSuite("AllUsersTest") ); > > > >------------------------------------------------------- >This SF.Net email sponsored by Black Hat Briefings & Training. >Attend Black Hat Briefings & Training, Las Vegas July 24-29 - >digital self defense, top technical experts, no vendor pitches, >unmatched networking opportunities. Visit www.blackhat.com >_______________________________________________ >phpwiki-checkins mailing list >php...@li... >https://lists.sourceforge.net/lists/listinfo/phpwiki-checkins > > |