Installing PHPUnit via PEAR
I had the same problem yesterday, and solved it by updating the channels
pear clear-cache
pear update-channels
before trying to install phpUnit.
Windows Installing PHPUnit via PEAR - Installing PHPUnit via PEAR
I'm a really newbie but hope to be of any help.
I just succeeded installing PHPUnit a moment ago.
My env. is Wamp2.1.
I don't know exactly how this works but it worked for me, so try this.
pear clear-cache
then,
pear install -a -f phpunit/PHPUnit
Somewhere in the failing message, I saw something about cache so I used clear-cache
.
It did some trick in installing process, I guess.
Good luck!
How do I correctly install PHPUnit with PEAR?
I had the same problem while upgrading my phpunit.
This solved the problem:
pear channel-discover pear.symfony.com
pear install pear.symfony.com/Yaml
Then run:
pear install --alldeps pear.phpunit.de/PHPUnit
OBS: I think the pear install pear.symfony.com/Yaml
is not necessary. I'm just posting it because it is exactly the way I solved my problem.
installing phpunit/PHPUnit-3.5.5 via pear (for sonar)
To get this from the unanswered questions page: See How to install an older version of PHPUnit through PEAR? for an exact answer to your problem.
Installing PHPUnit 3.8 via Pear
It looks like 3.8 has been remove from the pear repo.
http://pear.phpunit.de/
Installing PEAR and PHPUnit with xampp
It seems the issue is not with PHPUnit but with your pear installation in general.
The user you run the install with does not have the privileges to create the needed folders.
Ether fix those permissions or start the cmd prompt with admin privileges (windowsbutton & enter "cmd" then strg+shift+enter) and rerun the commands.
Install phpunit on windows
Old answer (2014):
It's said that phpunit will not be available via PEAR since December 2014.
So it's easy to install it using composer:
composer global require "phpunit/phpunit=4.1.*"
Update 2019: it should be installed as a local (for your project) development package:
composer require --dev phpunit/phpunit ^8
Update 2020: it should be installed as a local (for your project) development package:
composer require --dev phpunit/phpunit ^9.3
Related Topics
Default as First Option in Switch Statement
Detect If Cookies Are Enabled in PHP
PHP Remember File Field Contents
Php, Merging Arrays with Common Keys
Using Gcm to Send Notifications on App, Returns Invalidregistration Error
How to Enable Put Requests in Azure
Could Not Connect to Smtp Host
Select MySQL Rows But Rows into Columns and Column into Rows
How to Get Value from Form Without Submitting It
PHP Using Declare? What Is a Tick
PHP Array_Intersect() Efficiency
Simple PHP Echo Code Not Working
How to Convert PHP Regex to JavaScript Regex
How to Save PHP Session Data to a Database Instead of in the File System