Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- This version of PHPUnit is not supported in Zend Framework 1.x unit tests.
- To install PHPUnit 3.4:
- sudo pear config-set auto_discover 1
- sudo pear install --installroot /usr/local/phpunit34 pear.phpunit.de/PHPUnit-3.4.15
- This will install PHPUnit-3.4.15 to /usr/local/phpunit34.
- Now edit /usr/local/phpunit34/usr/bin/phpunit. Before the first
- require_once statement in that file, enter the following code:
- set_include_path(implode(PATH_SEPARATOR, array(
- __DIR__ . '/../share/php',
- '/usr/share/php',
- get_include_path()
- )));
- Note the actual directory (share/php in the code above) depends on your
- particular installation. The correct path can be found by typing:
- pear config-show|grep php_dir
- (on Centos it is share/php, on Ubuntu/Debian it is share/pear and on
- OS X it is lib/php/pear)
- Lastly, we need a symlink:
- sudo ln -s /some/path/phpunit34/usr/bin/phpunit /usr/bin/phpunit34
- Now you can run the unit tests with:
- phpunit34 --stderr -d memory_limit=-1 Zend/{Name}/AllTests.php
- (Based on information from Christer Edvartsen's article published at
- http://tech.vg.no/2011/11/29/running-multiple-versions-of-phpunit/)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement