2017 © Pedro Peláez
 

library hamcrest-callback-matcher

Hamcrest matcher that matches against a provided callback.

image

ascii-soup/hamcrest-callback-matcher

Hamcrest matcher that matches against a provided callback.

  • Wednesday, March 16, 2016
  • by ascii-soup
  • Repository
  • 1 Watchers
  • 1 Stars
  • 616 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 10 % Grown

The README.md

Hamcrest Callback Matcher

Usage:, (*1)

assertThat("hello", matchesUsing(function($value) { return $value === "hello"; }));

Creating new custom matchers

Creating new custom matchers is made simpler with the callback matcher., (*2)

You can use describedAs() to provide a better description for the expectation., (*3)

function myCustomMatcher()
{
    return describedAs('a custom value', new CallbackMatcher(
        function($value) {
            return $value === 'my custom value';
        }
    )
}

The Versions

16/03 2016

dev-master

9999999-dev

Hamcrest matcher that matches against a provided callback.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Nils Luxton

16/03 2016

1.1

1.1.0.0

Hamcrest matcher that matches against a provided callback.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Nils Luxton

16/03 2016

1.0

1.0.0.0

Hamcrest matcher that matches against a provided callback.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Nils Luxton