# Mockery

PHP mock object framework for creating test doubles with a readable API in unit tests run with PHPUnit, PHPSpec or another testing framework.


Source: https://findsoftware.frbit.cloud/mockery/
Last reviewed: 2026-11-16
Listed since: 2026-11-16

## Record

### Links

- home: https://docs.mockery.io/en/stable/
- repository: https://github.com/mockery/mockery
- docs: https://docs.mockery.io/en/stable/

### Identity

- status: active
- maintainer: Pádraic Brady
- maintainerType: unknown
- parent: unknown
- firstRelease: 2010
- hqCountry: unknown

### Kind

- category: testing
- hosting: not applicable
- language: php
- runtime: php
- runtimeMin: php 7.3
- basedOn: unknown

### Content

- contentStore: not applicable
- databases: not applicable
- adminUi: not applicable
- headlessApi: not applicable
- templating: not applicable
- i18n: not applicable

### Rendering and deploy

- runsAs: unknown
- renderingModes: not applicable
- installMethod: composer, git

### License

- licenseModel: open-source
- license: BSD-3-Clause

### Releases

- currentMajor: 1
- latestReleaseDate: 2026-08-19

### Adoption

- githubStargazers: 10722
- packagistDownloads: 595145420
- npmWeeklyDownloads: not applicable
- contributors: 200
- pluginCount: unknown
- packagistMonthlyDownloads: unknown
- ecosystemsMonthlyDownloads: unknown
- httpArchiveSites: unknown
- wordpressActiveInstalls: unknown
- dependentRepos: 482492
- dependentPackages: 22331

### Sources

- urls: https://docs.mockery.io/en/stable/ (read 2026-11-16)
- urls: https://api.github.com/repos/mockery/mockery (read 2026-11-16)
- urls: https://github.com/mockery/mockery/blob/1.6.x/README.md (read 2026-11-16)
- firstRelease: https://api.github.com/repos/mockery/mockery/commits/0.6.0 (read 2026-11-16)
- maintainer: https://github.com/mockery/mockery/blob/1.6.x/LICENSE (read 2026-11-16)
- language: https://api.github.com/repos/mockery/mockery (read 2026-11-16)
- category: https://docs.mockery.io/en/stable/ (read 2026-11-16)
- runtime: https://docs.mockery.io/en/stable/ (read 2026-11-16)
- runtimeMin: https://repo.packagist.org/p2/mockery/mockery.json (read 2026-11-16)
- installMethod: https://github.com/mockery/mockery/blob/1.6.x/README.md (read 2026-11-16)
- installMethod: https://docs.mockery.io/en/stable/getting_started/installation.html (read 2026-11-16)
- license: https://github.com/mockery/mockery/blob/1.6.x/LICENSE (read 2026-11-16)
- licenseModel: https://api.github.com/repos/mockery/mockery (read 2026-11-16)
- currentMajor: https://api.github.com/repos/mockery/mockery/releases/tags/1.6.15 (read 2026-11-16)
- latestReleaseDate: https://api.github.com/repos/mockery/mockery/releases/tags/1.6.15 (read 2026-11-16)
- githubStargazers: https://api.github.com/repos/mockery/mockery (read 2026-11-16)
- contributors: https://api.github.com/repos/mockery/mockery/contributors?per_page=1 (read 2026-11-16)
- packagistDownloads: https://packagist.org/packages/mockery/mockery.json (read 2026-11-16)
- dependentPackages: https://packages.ecosyste.ms/api/v1/registries/packagist.org/packages/mockery%2Fmockery (read 2026-11-16)
- dependentRepos: https://packages.ecosyste.ms/api/v1/registries/packagist.org/packages/mockery%2Fmockery (read 2026-11-16)

## Notes

Mockery is a PHP mock object framework for creating test doubles in unit tests. Its documentation describes it as usable with PHPUnit, PHPSpec or any other testing framework. It is installed as a development dependency with Composer, or by cloning its repository. The project describes itself as a drop-in alternative to PHPUnit's phpunit-mock-objects library and says it can run alongside that library.

## Worth knowing

The README says some of Mockery's internals are private and may change at any time, so a class that is not final, or a method that is not private, is not necessarily part of the API the versioning scheme covers.

---

Data licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Attributes are recorded, never scored; absent means unknown.
Credit, in full: FindSoftware, CC BY 4.0
