Help with Unit Tests

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
Torment
Forum Newbie
Posts: 2
Joined: Thu Aug 09, 2007 4:32 pm
Location: Austin, TX USA

Help with Unit Tests

Post 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?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post 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 ;)
Torment
Forum Newbie
Posts: 2
Joined: Thu Aug 09, 2007 4:32 pm
Location: Austin, TX USA

Post 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
Post Reply