zf工具和PHPunit在include_path中无法识别 [英] zf tool & PHPunit not recognised in include_path

查看:82
本文介绍了zf工具和PHPunit在include_path中无法识别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经为此苦苦挣扎了一段时间.

I've be struggling with this for a while.

当使用Zend Framework 1.11中包含的zf工具创建项目和操作等时,我总是会注意到在包含路径中未找到PHPUnit,因此未自动创建测试.我知道这只是一个通知,而不是一个错误,但是我希望它能正常工作.

When using the zf tool included in the Zend Framework 1.11 to both create projects and actions and so on, I always get the notice that PHPUnit was not found in the include path and hence the test have not automatically been created. I know that this is only a notice and not an error however I would like it to work.

我正在使用OS X 10.7和MAMP,我在MAMP中的包含路径如下:

I am using OS X 10.7 and MAMP, my include path in MAMP is as follows:

include_path = ".:/Applications/MAMP/bin/php/php5.3.6/lib/php:/Applications/MAMP/bin/php/php5.3.6/lib/php/PHPUnit"

到目前为止,我在互联网上发现的问题的唯一暗示是zf工具正在使用本地安装的php和include路径,因此没有注意到PHPUnit.

The only hint of the problem I have found so far on the internet is that the zf tool is using the natively installed php and include path and hence not noticing the PHPUnit.

我想我可以找到php.ini文件并将PHPUnit添加到它的include路径,但是感觉有点黑.

I suppose that I could find the php.ini file and add the PHPUnit to it's include path but it feels a little bit of a hack.

是否可以优先安装" php?

Is there away to "prioritise" php installs?

感谢您的帮助.

Al

推荐答案

我终于在 http:/上找到了答案/wiki.dreamhost.com/Zend_framework

基本上遵循步骤5.

替换

# find php: pear first, command -v second, straight up php lastly
if test "@php_bin@" != '@'php_bin'@'; then
    PHP_BIN="@php_bin@"
elif command -v php 1>/dev/null 2>/dev/null; then
    PHP_BIN=`command -v php`
else
    PHP_BIN=php
fi

PHP_BIN=/Applications/MAMP/bin/php/php5.3.6/bin/php

无论如何,谢谢您的帮助.

Thank for your help anyway.

这篇关于zf工具和PHPunit在include_path中无法识别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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