安装下面的phpunit时出现错误
'D:'XAMPP'htdocs'Selenium_Test>pear install phpunit.de/PHPUnit
Attempting to discover channel "phpunit.de"...
Attempting fallback to https instead of http on channel "phpunit.de"...
unknown channel "phpunit.de" in "phpunit.de/PHPUnit"
invalid package name/package file "phpunit.de/PHPUnit"
install failed'
对于Channel也是:
'D:'XAMPP'php>pear channel-discover pear.phpunit.de
Discovering channel pear.phpunit.de over http:// failed with message: channel-ad
d: Cannot open "http://pear.phpunit.de/channel.xml" (File http://pear.phpunit.de
:80/channel.xml not valid (received: HTTP/1.1 410 Gone))
Trying to discover channel pear.phpunit.de over https:// instead
Discovery of channel "pear.phpunit.de" failed (channel-add: Cannot open "https://pear.phpunit.de/channel.xml" (Connection to `pear.phpunit.de:443' failed:
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.))'
请尽快帮我解决这个问题。
放弃PEAR安装方法(如下所述)。
请按照此处的windows安装说明进行操作。
一个简单的方法是:
- 下载phpunit。
- 创建一个脚本文件用于启动:
echo @php "%~dp0phpunit.phar" %* > phpunit.cmd
- 启动它,如
phpunit --version
希望对您有所帮助