Had a real issue installing PHPUnit on my Vagrant server.
Initially I got this error:
Call to undefined method PHP_CodeCoverage_Filter::getInstance() in /usr/bin/phpunit on line 39
Googling around, many people solved using:
sudo apt-get remove phpunit
sudo apt-get upgrade pear
sudo pear channel-discover pear.phpunit.de
sudo pear channel-discover pear.symfony-project.com
sudo pear channel-discover pear.symfony.com
sudo pear channel-discover components.ez.no
sudo pear update-channels
sudo pear upgrade-all
sudo pear install --alldeps phpunit/PHPUnit
But for me, that then just left me with:
/usr/bin/phpunit: No such file or directory
Looking at my PEAR config:
pear config-show
Showed me that my PEAR executable directory was:
/home/vagrant/pear/bin
So then all I needed to do was symlink from usr/bin to the phpunit one:
sudo ln -s /home/vagrant/pear/bin/phpunit /usr/bin/
Recent Comments