sugared-rim/phpunit
Composer 安装命令:
composer require --dev sugared-rim/phpunit
包简介
PHPUnit sweetened with ease
README 文档
README
PHPUnit sweetened with ease 🍒
SugaredRim\PHPUnit takes an opinionated view of testing with PHPUnit, it is preconfigured to get you up and running as quickly as possible.
Install
$ composer require --dev sugared-rim/phpunit
Usage
Instead of requiring and running phpunit use sugared-rim-phpunit - that's it, no phpunit.xml* needed:
{
...
"require-dev": {
"sugared-rim/phpunit": ...
},
"scripts": {
"test": "sugared-rim-phpunit"
}
}
Configuration
You may overwrite some options by putting it in your composer.json.
Some of the default settings:
{
...
"scripts": {
"test": "sugared-rim-phpunit"
},
"extra": {
"sugared-rim/phpunit": {
"bootstrap": "vendor/autoload.php",
"coverage": {
"text": "php://stdout",
"clover": "build/logs/clover.xml",
"html": "build/coverage-phpunit/"
},
"src": "src",
"tests": "tests",
"colors": true,
"sugared": {
"listeners": [
]
}
}
}
}
src
The source directory.
tests
The tests directory.
coverage
See Command-Line Options for details.
Example: Add SpeedTrapListener
$ composer require --dev johnkary/phpunit-speedtrap
{
...
"extra": {
"sugared-rim/phpunit": {
"sugared": {
"listeners": [
{
"class": "JohnKary\\PHPUnit\\Listener\\SpeedTrapListener",
"arguments": [{"slowThreshold": 500, "reportLength": 10}]
}
]
}
}
}
}
License
MIT © Michael Mayer
统计信息
- 总下载量: 486
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 16
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-11-08