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
Compliant and Reliable File Transfers Backed by Top Security Certifications Icon
Compliant and Reliable File Transfers Backed by Top Security Certifications

Cerberus FTP Server delivers SOC 2 Type II certified security and FIPS 140-2 validated encryption.

Stop relying on non-certified, legacy file transfer tools that creak under the weight of modern security demands. Get full audit trails, advanced access controls and more supported by an award-winning team of experts. Start your free 25-day trial today.
Start Free Trial
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