Unit testing 在zend服务器上安装phpunit

Unit testing 在zend服务器上安装phpunit,unit-testing,zend-framework,phpunit,zend-server,Unit Testing,Zend Framework,Phpunit,Zend Server,大家好,我已经经历了许多与这个问题相关的问题,但我仍然无法得到解决方案。我已经安装了Zend服务器。现在我想安装PHPunit。我安装了pear,然后安装了PHPUnit 我的Zend服务器安装在 C:\xyz\zend\ZendServer C:\xyz\zend\ZendServer\bin\PEAR\pear\PHPUnit 我的梨安装在 C:\xyz\zend\ZendServer\bin\PEAR PHPunit安装在 C:\xyz\zend\ZendServer C:\xyz

大家好,我已经经历了许多与这个问题相关的问题,但我仍然无法得到解决方案。我已经安装了
Zend服务器
。现在我想安装
PHPunit
。我安装了
pear
,然后安装了
PHPUnit

我的Zend服务器安装在

C:\xyz\zend\ZendServer
C:\xyz\zend\ZendServer\bin\PEAR\pear\PHPUnit
我的梨安装在

C:\xyz\zend\ZendServer\bin\PEAR
PHPunit安装在

C:\xyz\zend\ZendServer
C:\xyz\zend\ZendServer\bin\PEAR\pear\PHPUnit
我已经将
pear
path甚至PHPUnit path添加到
environmental path
变量中。然后我打开了位于

C:\xyz\zend\ZendServer\etc
并将include_path设置为

include_path = ".;c:\php\includes;c:\xyz\zend\ZendServer\bin\PEAR\pear;c:\xyz\zend\ZendServer\bin\PEAR\pear\PHPUnit"
现在,当我在cmd上运行命令来创建zend项目时,项目已经创建,但我也发现了这个注释

Testing Note: PHPUnit was not found in your include_path, therefore no testing action will be created.
有人请告诉我我做错了什么,在哪里设置这个包含路径


致以最良好的祝愿:-)

让我们做一些老派的调试:)

找到
path/zend framework/bin/zf.php
并在顶部附近添加:

var_dump(get_include_path());
现在让我们看看include路径是什么样子的:

$ zf create project ./two
string(32) ".:/usr/share/php"
Creating project at /path/to/two
Note: This command created a web project, for more information setting up your VHOST, please see docs/README
Testing Note: PHPUnit was not found in your include_path, therefore no testing actions will be created
我的PHPUnit不在
/usr/share/php
目录中。让我们通过将PHPUnit添加到include路径来解决这个问题

e、 g.如果PHPUnit位于
/path/to/PHPUnit
中,请打开
php.ini
文件并将其添加到include路径

第三次是魅力:

$ zf create project ./three
string(56) ".:/usr/share/php:/path/to/phpunit"
Creating project at /path/to/three
Note: This command created a web project, for more information setting up your VHOST, please see docs/README
如果您编辑了正确的
php.ini
,则添加到
zf.php
var_dump()
现在将使用您修改的任何内容来回显include路径,在我的情况下,它是正确的,因此现在PHPUnit正在工作


现在从
zf.php

中删除调试代码,尝试将PHPUnit.bat添加到Windows中的系统路径您是否绝对确定PHPUnit可以在
C:\xyz\zend\ZendServer\bin\PEAR\PEAR
目录中找到?如果您查看该目录,您应该会看到一个名为PHPUnit的目录,其中应该有PHPUnit php src文件。我问,因为PHPUnit与bin目录在一起是不寻常的。@BullfrogBlues是的,我非常确定:-)