dan-da/tester-php
Composer 安装命令:
composer require dan-da/tester-php
包简介
README 文档
README
A simple one-file php test harness.
This is a very lightweight test harness that can be easily installed with composer, or you can just copy the tester.php file into your own project.
Let's see an example test.
The test is in file eq.test.php.
<?php
namespace tester;
class eq extends test_base {
public function runtests() {
$this->test1();
}
protected function test1() {
$this->eq( 1, "1.00", 'one' );
$this->eq( 2, "2.00", 'two' );
}
}
And now let's execute it.
$ ../tester.php
Running tests in eq...
[pass] 1 == 1.00 | one
[pass] 2 == 2.00 | two
2 tests passed.
0 tests failed.
Usage
tester.php [testfilename]
By default, all files matching *.test.php in current directory will be run.
Installation and Running.
Library install
Normally you would install tester-php into your own project using a composer require in your project's composer.json, eg:
"require": {
"dan-da/tester-php"
}
Then run composer install.
tester.php is then available at /vendor/bin/tester.php.
Standalone install
git clone https://github.com/dan-da/hd-wallet-derive
cd hd-wallet-derive
php -r "readfile('https://getcomposer.org/installer');" | php
php composer.phar install
Run tests.
$ cd tests
$ ../tester.php
Todos
- add more example test cases
- add proper help/usage.
dan-da/tester-php 适用场景与选型建议
dan-da/tester-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 21.2k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2017 年 09 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 dan-da/tester-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 dan-da/tester-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 21.2k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 7
- 依赖项目数: 5
- 推荐数: 1
其他信息
- 授权协议: Unknown
- 更新时间: 2017-09-06