Portable PHPUnit

So looking into PHPUnit again this morning, and would be great to have a "portable" set up.  The usual way to set up PHPUnit is to install the PEAR package.  However it turns out it is possible to have a more portable set up which can be moved between my XAMPP usb pen, WAMP laptop setup and LAMP stack at work, without all needing to have PHPUnit installed under all the separate hosting accounts.

Found this post the other day: http://stackoverflow.com/questions/4801183/php-is-there-a-portable-version-of-phpunit.  Well in actual fact I found the process on another site, but that one sums it up pretty well I think.  And I don't think you'd need to use the git clone's either, you could I suppose download the source from github in an archive and extract it.
The main thing to remember is to update your include_path() to include all the paths to the modules you've downloaded though.


I will have to have a play around with this, as I have PHPUnit PEAR packages all installed on my localhost already, but am keen to have a portable solution.

Comments

  1. Further to this, I have also more recently discovered there is a PHP PHAR version of PHPUnit, which can be dropped into a directory and ran 'on the fly' using PHP 5.3 and above. I may post some more information in a separate blog post.

    ReplyDelete

Post a Comment

Popular posts from this blog

Navigating the Jungle of Web Traffic: A Technical Team Lead's Guide to "I'm a Celebrity, Get Me Out of Here"

TCP Handshake over IPv6

The Vital Importance of Secure Wi-Fi Networks