BigDiver

Dive away, explore the net…

Get Coverage Reports working with PHPUnit and MAMP

leave a comment »

If you get a “The Xdebug extension is not loaded. No code coverage will be generated.” error message when running phpunit –coverage-html test, you need to add Xdebug to the php.ini as follows:


zend_extension="/Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
;xdebug.idekey=

The actual path may actual be different as I am using ActiveState’s Komodo version of Xdebug that I manually copied to the PHP extensions directory.

If you are running MAMP Pro you should also add the above lines to the php.ini template. Do this by opening MAMP Pro Application and click “Edit Template” from the File menu, then click “PHP 5.3.6 php.ini”.

Save and restart your servers.

Advertisement

Written by bigdiver

November 10, 2011 at 3:56 pm

Posted in komodo, MAC OS, 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.