I am trying to get PHPUnit up and running the following are the steps I am currently following:
### Install new PEAR Version needed for PHPUnit 3.X
### Downl
this is a solution for a similar problem install propel orm in xampp. By default, pear tries install in c:\php\pear\data, and this folder don't exists, because pear is in c:\xampp\php\pear.
Show pear configutarion:
pear config-show
...
pear config-get data_dir
c:\php\pear\data
Change the pear configuration to:
pear config-set data_dir c:\xampp\php\pear\data
i hope this is useful ;)
This may help follow the below link: http://forum.kohanaframework.org/discussion/7346/installing-phpunit-on-windows-xampp/p1
You might want to add
pear clear-cache
to clear the REST/XML-RPC cache andpear config-set preferred_state beta
to set the preferred package state to beta This results in
php go-pear.phar
pear clear-cache
pear update-channels
pear upgrade --alldeps -f
pear channel-discover pear.phpunit.de
pear channel-discover pear.symfony-project.com
pear channel-discover components.ez.no
pear config-set preferred_state beta
pear install --onlyreqdeps phpunit/PHPUnit
If you are on Widows 8, make sure you opened a command window as administrator, otherwise dir creation will be silently rejected by the OS !
I was able to get pear (and subsequently, phpunit) working by creating a symlink in C:\ that points to the xamp php installation directory. That makes everything that expects php to be in C:\php happy, while not breaking anything that expected php to be in xampp:
In cmd.exe, I typed:
C:\Windows>cd \
C:\>junction php C:\path\to\xampp\php
I updated my php.ini to use C:\php as the location for php. I then installed pear (as a local installation, not system). Once pear was installed, installing phpunit was simple:
C:\>pear channel-discover components.ez.no
C:\>pear channel-discover pear.phpunit.de
C:\>pear channel-discover pear.symfony-project.com
And then finally,
C:\>pear install --alldeps phpunit/PHPUnit
To install in D:\xampp\php, set the following directory paths using pear config-set command
D:
cd D:\xampp\php
pear config-set doc_dir d:\xampp\php\pear\docs
pear config-set cfg_dir d:\xampp\php\pear\cfg
pear config-set data_dir d:\xampp\php\pear\data
pear config-set cache_dir d:\xampp\php\pear\cache
pear config-set download_dir d:\xampp\php\pear\download
pear config-set temp_dir d:\xampp\php\pear\temp
pear config-set test_dir d:\xampp\php\pear\tests
pear config-set www_dir d:\xampp\php\pear\www