I’m using Zend Framework for some projects and want to build up PHPUnit test suites for them. Unfortunately, Zend Framework in it’s current version (1.11.x) only supports PHPUnit 3.5. At the same time, I would also like to start working with the Symfony framework, which in turn supports newer versions of PHPUnit. The question then is, how can I run multiple versions of PHPUnit on my dev machine at the same time without having to install separate servers or things like that?
I’m running OS X Lion (10.7) and using apache and php (5.3.10) installed through MacPorts. Ideally, I would like to end up in a situation where I could simply type e.g. phpunit5 in the terminal to execute the 3.5 version and type phpunit6 to execute the 3.6 version, and so on.
I’d recommend you check this blog post:
For a chef-recipe, check my blog post:
In case the links stop working:
--installrootswitchexample:
pear install –installroot /some/path/phpunit34 pear.phpunit.de/PHPUnit-3.4.15
Once install, you may have to add
/some/path/phpunit34/usr/bin/to$PATHor create a symlink to/usr/binlike the blog post illustrates.HTH