使用自定义PHP路径运行Phpunit

发布于 2025-01-29 12:25:41 字数 567 浏览 3 评论 0原文

我正在使用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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

赤濁 2025-02-05 12:25:41

已解决:我已经运行/logi/php7211/bin/php ./phpunit-version

SOLVED: I've to run /logi/php7211/bin/php ./phpunit --version

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文