gong023 / phpunityo
此包的最新版本(0.1.0)没有提供许可证信息。
0.1.0
2015-01-12 18:04 UTC
Requires
- php: >=5.4.0
- black/yo-php: 0.5.0
- gong023/tiny_config_php: 0.1.*
Requires (Dev)
- fabpot/php-cs-fixer: 1.*
- gong023/assert_chain: dev-master
- mockery/mockery: 0.9.*
- phpunit/phpunit: 4.4.*
This package is auto-updated.
Last update: 2024-08-27 20:37:50 UTC
README
当PHPUnit成功或失败时发送Yo。
您可以在travis上使用。
如何使用
1. 设置Yo
从http://dev.justyo.co/获取API令牌,并将其导出。
export YO_API_TOKEN="xxxx"
如果您想在travis上使用PHPUnityo,请加密令牌。
gem install travis # if you need
travis encrypt -r your/repository YO_API_TOKEN=xxxx
并将加密后的令牌添加到.travis.yml中
env: global: YO_API_TOKEN='yourencryptedtoken'
2. 设置PHPUnityo
安装PHPUnityo。
composer require --dev gong023/phpunityo:0.1.*
将PHPUnit监听器设置添加到您的phpunit.xml.dist中。
<listeners> <listener class="PHPUnit_Yo" file="vendor/gong023/src/PHPUnit_Yo.php"> <arguments> <string name="sendUser">Your Name</string> <string name="onSuccess">false</string> <string name="onFailure">true</string> </arguments> </listener> </listeners>
就这么多。
如果您在phpunit.xml.dist中启用onSuccess
,PHPUnityo只有在测试成功时才会发送Yo。
如果您在phpunit.xml.dist中启用onFailure
,PHPUnityo只有在测试失败时才会发送Yo。
在travis-ci.org上,PHPUnityo会附带构建URL发送Yo。