我想创造环境。 CakePHP + Hudson CI env。 但。我没有安装PEAR的特权 所以我在vendor / pear / Stagehand上设置了Stagehand模块 但那不行。 : - <
require_once(Stagehand/Autoload.php): failed to open stream: No such file or directory
php -d include_path=./:$CAKE/vendors/pear/PEAR/ ./vendors/pear/bin/cakerunner --cakephp-app-path $CAKE/app --log-junit=$CAKE/app/tmp/logs/unittest.xml -R $CAKE/app/tests/cases
Fatal error: Class 'Stagehand_TestRunner_Runner_RunnerFactory' not found
你有解决方案吗?
答案 0 :(得分:0)
:$CAKE/vendors/pear/PEAR/
可能错了。我想Stagehand/Autoload.php
文件已安装在vendors/pear/Stagehand/Autoload.php
中。在这种情况下,请使用
-d include_path=./:$CAKE/vendors/pear/
答案 1 :(得分:0)
我推荐PHP应用程序的项目特定PEAR环境。在您的情况下,您的项目可以包括PEAR基本系统和所需的包,如下所示:
或
在介绍特定于项目的PEAR环境后,您可以指定预载脚本的路径:
set_include_path('/path/to/project/vendors/pear');
最后,编辑运行测试的命令行:
/path/to/php /path/to/project/vendors/pear/bin/cakerunner -p /path/to/preload.php --cakephp-app-path=/path/to/project/app --cakephp-core-path=/path/to/project/cake ...
This manual page解释了如何为项目构建项目特定的PEAR环境。