CentOS 7 上未安装 PHPUnit

CentOS 7 上未安装 PHPUnit

我在 CentOS 7 上安装了 PHP 7.2.33。我正在尝试使用以下方法安装 PHPUnit本文档

前两行执行无任何错误

# wget -O phpunit https://phar.phpunit.de/phpunit-8.phar
--2020-09-30 06:56:30--  https://phar.phpunit.de/phpunit-8.phar
Resolving phar.phpunit.de (phar.phpunit.de)... 188.94.27.25
Connecting to phar.phpunit.de (phar.phpunit.de)|188.94.27.25|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://phar.phpunit.de/phpunit-8.5.8.phar [following]
--2020-09-30 06:56:31--  https://phar.phpunit.de/phpunit-8.5.8.phar
Reusing existing connection to phar.phpunit.de:443.
HTTP request sent, awaiting response... 200 OK
Length: 2981560 (2.8M) [application/octet-stream]
Saving to: ‘phpunit’

100%[==================================================================================================================================================================>] 2,981,560   1.85MB/s   in 1.5s   

2020-09-30 06:56:33 (1.85 MB/s) - ‘phpunit’ saved [2981560/2981560]

# chmod +x phpunit
#

当测试 PHPUnit 版本时,没有出现预期的输出。

# ./phpunit --version
Content-type: text/html; charset=UTF-8

#

预期输出仅供参考。

# ./phpunit --version
PHPUnit 8.0.0 by Sebastian Bergmann and contributors.
#

看起来 PHPUnit 未正确安装。原因是什么?

相关内容