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-10-24 04:49:51 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>