PHP:如何调整 PHPUnit 以使用不同的 PHP 解释器? [英] PHP: How can I tweak PHPUnit to use a different PHP interpreter?

查看:11
本文介绍了PHP:如何调整 PHPUnit 以使用不同的 PHP 解释器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的系统有两个 PHP 解释器.一个是与操作系统捆绑在一起的,另一个是我通过 XAMPP 包安装的.我所有的 PHP 扩展都应用于 XAMPP 安装,但 PHPUnit 似乎只运行我的机器附带的 PHP 版本.

My system has two PHP interpreters. One came bundled with the OS and the other I installed via the XAMPP package. All of my PHP extensions are applied to the XAMPP installation but PHPUnit seems to only run the version of PHP that came with my machine.

有人知道我可以配置或重建 PHPUnit 以便它专门使用我的 XAMPP PHP 解释器吗?

Does anybody know of a way I can configure or rebuild PHPUnit so that it uses my XAMPP PHP interpreter exclusively?

推荐答案

找到你安装PHPUnit的文件夹.应该有一个名为phpunit.bat的文件.它应该有一行内容类似于

Find the folder you installed PHPUnit in. There should be a file called phpunit.bat. It should have a line that reads something like

set PHPBIN="C:phpphp.exe"
%PHPBIN% "C:phpphpunit" %*

改为阅读

set PHPBIN="C:xamppphpphp.exe"
%PHPBIN% "C:xamppphpphpunit" %*

或者你的 PHP 可执行文件的路径是什么

Or whatever the path to your PHP executable is

这篇关于PHP:如何调整 PHPUnit 以使用不同的 PHP 解释器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆