Send Yo when PHPUnit successes or fails.
PHP Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
test
.gitignore
.php_cs
.travis.yml
README.md
composer.json
phpunit.xml.dist

README.md

PHPUnityo

Build Status

Send Yo when PHPUnit successes or fails.

You can use at travis.

How to use

1. Set up Yo

Get api token from http://dev.justyo.co/, and export it.

export YO_API_TOKEN="xxxx"

If you want to use PHPUnityo at travis, encrypt token.

gem install travis # if you need
travis encrypt -r your/repository YO_API_TOKEN=xxxx

And add encrypted token to .travis.yml

env:
  global:
    YO_API_TOKEN='yourencryptedtoken'

2. Setup PHPUnityo

Install PHPUnityo.

composer require --dev gong023/phpunityo:0.1.*

Add PHPUnit listener setting to your 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>

That's all.

If you turn onSuccess on at phpunit.xml.dist, PHPUnityo sends Yo only when test successes.

If you turn onFailure on at phpunit.xml.dist, PHPUnityo sends Yo only when test fails.

At travis-ci.org, PHPUnityo sends Yo with build URL.