Hamcrest is a matching library originally written for Java, but subsequently ported to many other languages. hamcrest-php is the PHP port of Hamcrest and essentially follows a literal translation of the original Java API for Hamcrest, with a few Exceptions, mostly down to PHP language barriers. Unless it would be non-semantic for a matcher to do so, hamcrest-php allows dynamic typing for it's input, in "the PHP way". Exception are where semantics surrounding the type itself would suggest otherwise, such as stringContains() and greaterThan(). Several matchers have not been ported because they don't make sense or don't apply in PHP. When most of the collections matchers are finally ported, PHP-specific aliases will probably be created due to a difference in naming conventions between Java's Arrays, Collections, Sets and Maps compared with PHP's Arrays.

Features

  • Hamcrest matchers are easy to use
  • You can use the global proxy-functions
  • The global proxy-functions aren't autoloaded by default
  • A tutorial can be found on the Hamcrest site
  • Evaluate arrays

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

BSD License

Follow Hamcrest PHP

Hamcrest PHP Web Site

Other Useful Business Software
Contractor Foreman is the most affordable all-in-one construction management software for contractors and is trusted by contractors in more than 75 countries. Icon
Contractor Foreman is the most affordable all-in-one construction management software for contractors and is trusted by contractors in more than 75 countries.

For Residential, Commercial and Public Works Contractors

Starting at $49/m for the WHOLE company, Contractor Foreman is the most affordable all-in-one construction management system for contractors. Our customers in 75+ countries and industry awards back it up. And it's all backed by a 100 day guarantee.
Learn More
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Hamcrest PHP!

Additional Project Details

Programming Language

PHP

Related Categories

PHP Libraries

Registered

2021-08-20