2013-04-02



I’m very happy to announce the release of Mockery 0.8.0.

Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succint API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL). Designed as a drop in alternative to PHPUnit’s phpunit-mock-objects library, Mockery is easy to integrate with PHPUnit and can operate alongside phpunit-mock-objects without the World ending.

The new version of Mockery is the first in a year (since 0.7.2) and is packed with new features, bug fixes and even better support for PHP’s OOP model. It’s also the first version to be released with my new co-conspirator, Dave Marshall (@davedevelopment), who threatens to make me redundant as a maintainer! This version focuses primarily on stability but it’s worth reviewing the README for the new sections on Creating Partial Mocks and Behaviour Modifiers for mock objects.

For those who haven’t been using dev-master in their composer.json project file, you can now update to the 0.8.0 stable tag using Composer or grab the 0.8.0 package from the PEAR channel at http://pear.survivethedeepend.com.

A very special thanks to those who opened pull requests and reported issues over the past year.

Show more