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 succinct 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.

Mockery is released under a New BSD License.

The current released version on Packagist is 0.9.4. Composer users may opt to use 0.9.* for the current stable package, or ~1.0@dev for the current master branch. Latest version released through PEAR was 0.9.0; channel is now closed.

Code Quality Rank: L4
Monthly Downloads: 1,954,373
Programming language: PHP
License: BSD 3-clause "New" or "Revised" License
Tags: Testing     Mock     Stub     BDD     TDD     Test     Test Double     Library     Mockery     Mock Objects    

Mockery alternatives and related libraries

Based on the "Testing" category

Do you think we are missing an alternative of Mockery or a related project?

Add another 'Testing' Library

Mockery Recommendations

There are no recommendations yet. Be the first to promote Mockery!

Have you used Mockery? Share your experience. Write a short recommendation and Mockery, you and your project will be promoted on Awesome PHP.
Recommend Mockery

Recently added Mockery resources

Do you know of a usefull tutorial, book or news relevant to Mockery?
Be the first to add one!