dongzhi5846
2014-08-12 13:57
浏览 59
已采纳

在脚本中包含PHPUnit.phar

I installed the latest release of PHPUnit using the phar according to the documentation. I have some scripts to compile a code coverage report using the PHP_CodeCoverage object. With the update, when I try to include phpunit.phar phpunit is actually run. The script outputs the list of options for running PHPUnit and then exits.

How can I include the file so that I have the PHPUnit objects available in my script?

The line that I tried was

require '/usr/local/bin/phpunit.phar';

图片转代码服务由CSDN问答提供 功能建议

我根据文档使用phar安装了最新版本的PHPUnit。 我有一些脚本使用 PHP_CodeCoverage </ code>对象编译代码覆盖率报告。 随着更新,当我尝试包含 phpunit.phar </ code>时,phpunit实际上正在运行。 该脚本输出用于运行PHPUnit的选项列表,然后退出。</ p>

如何包含该文件,以便在脚本中提供PHPUnit对象?</ p> \ n

我试过的行是</ p>

  require'/usr/local/bin/phpunit.phar';
</ DIV>

1条回答 默认 最新

相关推荐 更多相似问题