Page 1 of 1

Help with Unit Tests

Posted: Thu Aug 09, 2007 5:04 pm
by Torment
I've installed SwiftMailer on two different Debian servers but keep getting the following error whenever I try to run any of the Unit Tests:
Fatal error: Cannot redeclare class HtmlReporter in /var/www/simpletest/reporter.php on line 184
I'm using the following:
SwiftMailer v3.2.6 for PHP5
SimpleTest v1.0.1 beta 2
Apache v2.2.3-4
PHP v5.2.0-8+etch7

When I run any of the tests included with SimpleTest, most of them run just fine (none of them get the error above). The Smoke Tests and the Benchmarks also run without problems. I've tried all three connection types (SMTP, Sendmail, & NativeMail) in the TestConfiguration.php file, but the error remains the same.

Does anybody have any ideas on what I can do to eliminate this error?

Posted: Thu Aug 09, 2007 6:39 pm
by Chris Corbyn
Yeah, Marcus changed something in the last month or two which has caused this (not his fault though ;)). I include all the simpletest files via a call to "require". I need to change them all to "require_once". This has already been done in subversion if you'd like to download the very latest code.

svn co https://swiftmailer.svn.sourceforge.net ... trunk/php5 (or php4 whichever you use).

If you aren't familiar with subversion I can provide you with a snapshot ;)

Posted: Fri Aug 10, 2007 2:17 pm
by Torment
WooHoo! That did it! I've never used subversion before, but your stickied SVN guide helped me get going.

Thanks for your help! Image