Download the PHP package probedock/probedock-phpunit without Composer
On this page you can find all versions of the php package probedock/probedock-phpunit. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package probedock-phpunit
PHPUnit probe for Probe Dock
PHPUnit listener to publish test results to Probe Dock.
- Setup
- Usage
- Troubleshooting
- AnnotationException: the annotation was never imported
Setup
Add probedock-phpunit
as a dependency in your composer.json
file:
Then run php composer.phar update
.
If you haven't done so already, set up your Probe Dock configuration file(s). This procedure is described here:
You must then add the Probe Dock PHPUnit listener to your PHPUnit configuration file (e.g. phpunit.xml.dist
).
This is the listener you must add:
Here's a complete sample of a phpunit.xml.dist
configuration file from a Symfony project, showing where to add the listener (at the bottom):
All test results will now be published to Probe Dock the next time you run your test suite!
Usage
To enrich tests with more information, you can use the @ProbeDock
annotation:
Troubleshooting
AnnotationException: the annotation was never imported
This library uses Doctrine annotations so you can enrich tests with additional information such as tags.
If you are using other annotations, they may come into conflict with the Doctrine annotations library.
For example, this error may occur in a project where an @expectedException
annotation was used in the tests:
To solve this issue, you must add the annotations not known by Doctrine to its global ignore list. The following code in your tests' bootstrap file will do the trick:
If you do not already have a bootstrap file for your tests, you can create it and add its path to the <phpunit>
tag in your phpunit.xml.dist
configuration file:
Contributing
- Fork
- Create a topic branch -
git checkout -b feature
- Push to your branch -
git push origin feature
- Create a pull request from your branch
Please add a changelog entry with your name for new features and bug fixes.
Contributors
- Originally developed by François Vessaz
License
probedock-phpunit is licensed under the MIT License. See LICENSE.txt for the full text.
All versions of probedock-phpunit with dependencies
phpunit/phpunit Version >=3.7 <6.0.0
guzzlehttp/guzzle Version ^6.2
ramsey/uuid Version ^3.4
camspiers/json-pretty Version ^1.0
doctrine/annotations Version ^1.2
symfony/yaml Version ^3.1