Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Best version of PHPUnit to use


Reply


4 Posts   1100 Views

Avatar
Mo

Community Member, 510 Posts

29 October 2010 at 4:20am

Hi All,

Just installed the latest PHPUnit (3.5.something) on my Mac, there seem to be some issues with how SIlverstripe includes it.

I get these errors repeatedly:

[User Notice] Please no longer include "PHPUnit/Framework.php".

I was wondering what the recommended version is?

I have tried 3.0.0, but am getting errors like:

Warning: set_error_handler() expects the argument (PHPUnit_Util_ErrorHandler::handleError) to be a valid callback in /Users/morven/Sites/co/2010-xmas-game/sapphire/dev/SapphireTest.php on line 667

Does SS work best with pre v3 versions of PHPUnit?

Cheers,

Mo

Avatar
Mo

Community Member, 510 Posts

29 October 2010 at 4:32am

Ok, I have uninstalled and re-installed a load of different versions of PHP unit. It seems that 3.4.x works best.

I am using 3.4.9 with SS 2.4.1

Hope that helps someone. Not sure if this the "recommended" version, but seems to work pretty well.

Mo

Avatar
Ricardona

Community Member, 26 Posts

7 November 2010 at 2:24am

You are my hero man!

Thanks a lot :)

Avatar
Sean

Forum Moderator, 922 Posts

8 November 2010 at 11:30am

Edited: 08/11/2010 11:30am

PHPUnit 3.5 should work with 2.4.3 once it's released, there were recent changes to support this new version since it's quite different to 3.4.

PHPUnit 3.4 should work without any problems on 2.4.1, 2.4.2 and 2.4.3 once it's released.

Thanks,
Sean