Hamcrest

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.