merkushin/php.autotest

此包的最新版本(dev-main)没有提供许可证信息。

自动运行测试

dev-main 2017-04-01 19:37 UTC

This package is not auto-updated.

Last update: 2024-09-20 19:30:05 UTC


README

需求

  • PHP 5.3+
  • PHPUnit
  • Symfony/Console

安装

下载并解压 php.autotest。

下载 Composer (https://getcomposer.org.cn) 并运行

composer.phar install

Composer 安装 Console 组件

可选地将 bin/autotest.php 链接到 /usr/bin,如下所示

ln bin/autotest.php /usr/bin/autotest

用法

从应用的根目录运行 bin/autotest.php,并可选地添加参数

  • cmd — phpunit 的路径(可选,默认值:phpunit)
  • src_path — 源代码的路径(可选,默认值:src)
  • tests_path — 测试的路径(可选,默认值:tests)
  • suffix — 测试命名空间的后缀(可选,默认值:Test)
  • timeout — 比较文件之间的时间(可选,默认值:1 秒)

示例(假设文件已链接到 bin 目录)

autotest --cmd=/usr/local/zend/bin/phpunit --src_path=source --tests_path=MyTests --timeout=60