Latest: Genstatic, my first sip of coffee

Content with Style

Web Technique

Getting phpunit to work with MAMP

by Pascal Opitz on May 13 2009, 12:41

In order to run my unit tests, I needed to get phpunit running with MAMP. Thanks to the helpful post of Mark Kirby on this, I figured it out.

  1. cd into your PEAR installation directory
  2. Make backup of phpunit file in bin folder
  3. Edit the original file, replace #!/usr/bin/php with #!/Applications/MAMP/bin/php5/bin/php
  4. 3. Also remove this:
    
    if (strpos('/usr/bin/php', '@php_bin') === 0) {
        set_include_path(dirname(__FILE__) . PATH_SEPARATOR . get_include_path());
    }
    
  5. And finally, something that Mark didn't mention, add PEAR include path into /Applications/MAMP/conf/php5/php.ini

Comments

  • Pardon my absolute ignorance in PEAR but

    1. what is the PEAR include path?
    2. my pear.conf file looks like the result of a serialized PHP array. Is this normal? Do add the path to the bottom?

    Thanks.

    by Mike on June 6 2009, 21:16 - #

    1. The PEAR include path is the path in your php.ini that enables PEAR modules to be included
    2. Yes, it is normal, for the pear.conf. No, the path needs to be in the php.ini. Sorry, my fault, I corrected this.

    by Pascal Opitz on June 30 2009, 00:06 - #

Leave your comment

Comments are moderated.
Tags allowed: a, strong, em, code, ul, ol, li, q, blockquote, br, p

Advertisement
Advertisement