From ArchWiki
Revision as of 02:00, 27 December 2012 by Lanyitin800830 (Talk | contribs) (Installing)

Jump to: navigation, search


First of all, you need PEAR to install PHPUnit.

pacman -S php-pear

Now you can do just like the official documentation. As root (sudo will NOT be enough, You'll have to do this as "real" root), just type

pear config-set auto_discover 1
pear install phpunit/PHPUnit

Notice that you might have to run following command before start to install phpunit

#pear clear-cache



For running PHPUnit properly you must have the /usr/bin/ directory listed in the open_basedir option at the /etc/php/php.ini

open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/bin/

Or just unset it

open_basedir =


In some php framework, you will meet the error of missing Selenium. Just install the selenium package with pear ( make sure you have root right )

 pear install phpunit/PHPUnit_Selenium