Hamcrest

Sebastian Bergmann » 29 December 2007 » in Hamcrest » 1 Comment

I have begun to port Hamcrest, which provides a library of matcher objects (also known as constraints or predicates) allowing "match" rules to be defined declaratively, to be used in other frameworks. Typical scenarios include testing frameworks, mocking libraries and UI validation rules, to PHP.

hamcrest-php complements the existing hamcrest-java and hamcrest-dotnet implementations.

The idea here is to use hamcrest-php in PHPUnit 4. I hope that it will also be used by (or be usable with) PHPMock, the new PHP library that abstracts the concept of Mock Objects found in testing libraries such as PHPUnit into a library of its own.
Defined tags for this entry: , ,

Trackback specific URI for this entry

1 Comment to "Hamcrest"

Display comments as (Linear | Threaded)
  1. Frank Kleine
    29/12/2007 at 15:15 Permalink
    Two thumbs up. One for doing the work, and one for using namespaces. :)

    Reply

2 Trackbacks to "Hamcrest"

  1. PHPDeveloper.org 01/01/2008 at 16:12
    In a new post to his blog, Sebastian Bergmann mentions a ...
  2. Sebastian Bergmann 08/01/2008 at 08:14
    I recently started porting Hamcrest to PHP. This tutorial shows you how to use Hamcrest for unit testing with PHP. Introduction Hamcrest is a framework for writing matcher objects allowing match rules to be defined declaratively. There are a number of s

Add Comment


To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

Submitted comments will be subject to moderation before being displayed.