开发者

Stagehand module withought PEAR

I wanna create environment . CakePHP + Hudson CI env. but. I don't h开发者_Go百科ave a privilege of installing PEAR so I set Stagehand module on vendor/pear/Stagehand but that is not work. :-<

 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

Do you have any solutions?


:$CAKE/vendors/pear/PEAR/ is probably wrong. I guess the Stagehand/Autoload.php file is installed in vendors/pear/Stagehand/Autoload.php. In that case, use

-d include_path=./:$CAKE/vendors/pear/


I recommend the project-specific PEAR environment for a PHP application. In yor case, your project can include the PEAR base system and required packages as follows:

  • vendors/pear/PEAR.php
  • vendors/pear/bin/cakerunner
  • vendors/pear/Stagehand
  • vendors/pear/...

or

  • app/vendors/pear
  • ...

After introducing the project-specific PEAR environment, you can specify the path to into your preload script as:

set_include_path('/path/to/project/vendors/pear');

Finally, edit the command line for running tests as:

/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 explains how to build the project-specific PEAR environment for your project.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜