使用自定义PHP路径运行Phpunit
我正在使用RedHat服务器工作,我将将单元测试(PHPUNIT)添加到现有应用程序中,PHP安装在自定义路径/logi/php7211
(我不应该更改任何配置) ,当我运行命令php -v
时,我得到 - bash:php:commande Intougable
(这对我来说不是问题)。
当我运行命令/logi/php7211/bin/php -v
时,我得到php 7.2.11(cli)
已安装了PHP
➜ wget -O phpunit https://phar.phpunit.de/phpunit-5.phar
➜ chmod +x phpunit
我在运行命令<时 代码> ./ phpunit - version 我获取错误/usr/bin/env:php:aucun fichier ou dossier de ce类型
如何添加php的路径(/logi /php7211/bin/php)to phpunit?
I'm working on Redhat server, I'm going to add unit test (PHPUnit) to an existing application, PHP is installed on custom path /logi/php7211
(I shouldn't change any configuration), when I run the command php -v
I get -bash: php : commande introuvable
(This is not a probleme for me).
When I run the command /logi/php7211/bin/php -v
I get PHP 7.2.11 (cli)
I've installed php using
➜ wget -O phpunit https://phar.phpunit.de/phpunit-5.phar
➜ chmod +x phpunit
When I run the command ./phpunit --version
I get the error /usr/bin/env: php: Aucun fichier ou dossier de ce type
How can I add the path of php (/logi/php7211/bin/php) to phpunit ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
已解决:我已经运行
/logi/php7211/bin/php ./phpunit-version
SOLVED: I've to run
/logi/php7211/bin/php ./phpunit --version