graze/hamcrest-test-listener

A PHPUnit test listener for the hamcrest assertion library.

v3.0.0 2017-07-27 18:48 UTC

This package is auto-updated.

Last update: 2024-11-24 05:08:08 UTC


README

Build Status Coverage Status Quality Score Latest Version MIT Licensed

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>