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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

Best version of PHPUnit to use


Go to End


4 Posts   2312 Views

Avatar
Mo

Community Member, 541 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, 541 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