Skip to content
Mock Object library for PHPUnit

Latest Stable Version Minimum PHP Version Build Status


PHPUnit_MockObject is the default mock object library for PHPUnit.


  • PHP 5.6 is required but using the latest version of PHP is highly recommended


To add PHPUnit_MockObject as a local, per-project dependency to your project, simply add a dependency on phpunit/phpunit-mock-objects to your project's composer.json file. Here is a minimal example of a composer.json file that just defines a dependency on PHPUnit_MockObject 3.1:

    "require": {
        "phpunit/phpunit-mock-objects": "~3.1"
Something went wrong with that request. Please try again.