graze / hamcrest-test-listener
A PHPUnit test listener for the hamcrest assertion library.
Installs: 16 446
Dependents: 3
Suggesters: 0
Security: 0
Stars: 4
Watchers: 14
Forks: 3
Open Issues: 1
Requires
- php: ^7.0
- hamcrest/hamcrest-php: ^2.0
- phpunit/phpunit: ^6.0
Requires (Dev)
- mockery/mockery: dev-master
Conflicts
- phpunit/phpunit: 5.1.0
This package is auto-updated.
Last update: 2024-10-24 04:49:51 UTC
README
A PHPUnit test listener for the hamcrest assertion library.
Installation
NOTE:
For PHPUnit >= 6, please use version >= 3.0
For PHPUnit < 6, please use version < 3.0
~$ composer require --dev graze/hamcrest-test-listener
Usage
In your phpunit.xml file, add the following:
<phpunit beStrictAboutTestsThatDoNotTestAnything="false"> <!-- PHPUnit will not consider Hamcrest assertions --> <listeners> <listener class="\Hamcrest\Adapter\PHPUnit\TestListener"/> </listeners> </phpunit>