BigDiver

Dive away, explore the net…

PHPUnit 3.6 Tests and Komodo IDE Unit Testing

leave a comment »

The latest version of PHPUnit, which at the time of this writing is 3.6.3 breaks the Komodo IDE Test Plan feature due to the wrong PHPUnit include in the drive_testrunner.php file.

My php_error.log file had the following:


Fatal error: require_once(): Failed opening required 'PHPUnit/Framework.php' (include_path='.:/Applications/MAMP/bin/php/php5.3.6/lib/php') in /Applications/Komodo IDE.app/Contents/MacOS/python/komodo/harnesses/php/drive_testrunner.php on line 16
...
require_once() /Applications/Komodo IDE.app/Contents/MacOS/python/komodo/harnesses/php/drive_testrunner.php:57

All that I needed to do was to edit the file /Applications/Komodo IDE.app/Contents/MacOS/python/komodo/harnesses/php/drive_testrunner.php and replace the outdated

require_once 'PHPUnit/Framework.php'

With

require_once 'PHPUnit/Autoload.php'

right at the top and now all is working.

If your tests stil don’t run under Komodo set the PHP interpreter to the MAMP binary in the PHP Languages Properties in the Komodo Preferences.
In my case /Applications/MAMP/bin/php/php5.3.6/bin/php.

Happy testing.

If you’re having problems in getting PHPUnit to work in the first place check my other article to get PHPUnit to work with MAMP on Mac OSX Snow Leopard and Lion.

Advertisement

Written by bigdiver

November 10, 2011 at 1:50 pm

Posted in komodo, PHP

Tagged with , , , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.