问题描述
我的系统有两个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:\php\php.exe"
%PHPBIN% "C:\php\phpunit" %*
将其更改为读取
set PHPBIN="C:\xampp\php\php.exe"
%PHPBIN% "C:\xampp\php\phpunit" %*
或者您的PHP可执行文件的路径是
Or whatever the path to your PHP executable is
这篇关于PHP:如何调整PHPUnit以使用其他PHP解释器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!