PHPackages                             phpunit/phpunit-mock-objects - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. phpunit/phpunit-mock-objects

AbandonedArchivedLibrary[Testing &amp; Quality](/categories/testing)

phpunit/phpunit-mock-objects
============================

Mock Object library for PHPUnit

6.1.2(7y ago)4.9k207.6M—4.5%15320BSD-3-ClausePHPPHP ^7.1

Since Sep 19Pushed 7y ago2 watchersCompare

[ Source](https://github.com/sebastianbergmann/phpunit-mock-objects)[ Packagist](https://packagist.org/packages/phpunit/phpunit-mock-objects)[ Docs](https://github.com/sebastianbergmann/phpunit-mock-objects/)[ RSS](/packages/phpunit-phpunit-mock-objects/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (4)Versions (90)Used By (20)

[![Latest Stable Version](https://camo.githubusercontent.com/c54d31272831f6f44bae44a31757ae36d8e5c812f34d0f51f0b2c12bcb5e529e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706870756e69742f706870756e69742d6d6f636b2d6f626a656374732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/phpunit/phpunit-mock-objects)[![Minimum PHP Version](https://camo.githubusercontent.com/dcd4b4aec2c1709157fa6a2c050f709d75cde9552a79cfff0b70a97fad7281ae/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e312d3838393242462e7376673f7374796c653d666c61742d737175617265)](https://php.net/)[![Build Status](https://camo.githubusercontent.com/89c3bace279df639a131bdb99ad02a9dd2a4e771d6cb9c5ed0fc97de36a12a1a/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f73656261737469616e626572676d616e6e2f706870756e69742d6d6f636b2d6f626a656374732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://phpunit.de/build-status.html)

phpunit-mock-objects
====================

[](#phpunit-mock-objects)

**phpunit-mock-objects** is the default mock object library for PHPUnit.

###  Health Score

59

—

FairBetter than 99% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity81

Widely adopted with strong download metrics

Community48

Growing community involvement

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 81.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~24 days

Recently: every ~14 days

Total

89

Last Release

2809d ago

Major Versions

3.4.4 → 4.0.32017-08-03

4.0.x-dev → 5.0.02017-11-28

5.0.6 → 6.0.02018-02-01

5.0.7 → 6.1.22018-05-29

5.0.x-dev → 6.0.x-dev2018-09-09

PHP version history (5 changes)1.2.0PHP &gt;=5.3.3

3.0.0PHP &gt;=5.6

3.1.x-devPHP ^5.6 || ^7.0

4.0.0PHP ^7.0

6.0.0PHP ^7.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1089?v=4)[Sebastian Probst Eide](/maintainers/sebastian)[@sebastian](https://github.com/sebastian)

---

Top Contributors

[![sebastianbergmann](https://avatars.githubusercontent.com/u/25218?v=4)](https://github.com/sebastianbergmann "sebastianbergmann (773 commits)")[![whatthejeff](https://avatars.githubusercontent.com/u/306525?v=4)](https://github.com/whatthejeff "whatthejeff (50 commits)")[![edorian](https://avatars.githubusercontent.com/u/247397?v=4)](https://github.com/edorian "edorian (21 commits)")[![lstrojny](https://avatars.githubusercontent.com/u/79707?v=4)](https://github.com/lstrojny "lstrojny (9 commits)")[![MarioBlazek](https://avatars.githubusercontent.com/u/6605175?v=4)](https://github.com/MarioBlazek "MarioBlazek (8 commits)")[![giorgiosironi](https://avatars.githubusercontent.com/u/160299?v=4)](https://github.com/giorgiosironi "giorgiosironi (7 commits)")[![lcobucci](https://avatars.githubusercontent.com/u/201963?v=4)](https://github.com/lcobucci "lcobucci (7 commits)")[![nicolas-grekas](https://avatars.githubusercontent.com/u/243674?v=4)](https://github.com/nicolas-grekas "nicolas-grekas (7 commits)")[![trowski](https://avatars.githubusercontent.com/u/1628287?v=4)](https://github.com/trowski "trowski (6 commits)")[![ThomasWeinert](https://avatars.githubusercontent.com/u/236825?v=4)](https://github.com/ThomasWeinert "ThomasWeinert (6 commits)")[![fabian](https://avatars.githubusercontent.com/u/13346?v=4)](https://github.com/fabian "fabian (5 commits)")[![makasim](https://avatars.githubusercontent.com/u/143206?v=4)](https://github.com/makasim "makasim (5 commits)")[![prolic](https://avatars.githubusercontent.com/u/394428?v=4)](https://github.com/prolic "prolic (4 commits)")[![ksimka](https://avatars.githubusercontent.com/u/1818850?v=4)](https://github.com/ksimka "ksimka (4 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (4 commits)")[![remicollet](https://avatars.githubusercontent.com/u/270445?v=4)](https://github.com/remicollet "remicollet (3 commits)")[![lapistano](https://avatars.githubusercontent.com/u/95115?v=4)](https://github.com/lapistano "lapistano (3 commits)")[![Vinai](https://avatars.githubusercontent.com/u/72463?v=4)](https://github.com/Vinai "Vinai (3 commits)")[![sawmurai](https://avatars.githubusercontent.com/u/6454986?v=4)](https://github.com/sawmurai "sawmurai (3 commits)")[![JeroenDeDauw](https://avatars.githubusercontent.com/u/146040?v=4)](https://github.com/JeroenDeDauw "JeroenDeDauw (2 commits)")

---

Tags

mockxunit

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/phpunit-phpunit-mock-objects/health.svg)

```
[![Health](https://phpackages.com/badges/phpunit-phpunit-mock-objects/health.svg)](https://phpackages.com/packages/phpunit-phpunit-mock-objects)
```

###  Alternatives

[phpunit/phpunit

The PHP Unit Testing framework.

20.0k910.7M134.8k](/packages/phpunit-phpunit)[phpunit/php-code-coverage

Library that provides collection, processing, and rendering functionality for PHP code coverage information.

8.9k892.4M1.5k](/packages/phpunit-php-code-coverage)[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[php-mock/php-mock

PHP-Mock can mock built-in PHP functions (e.g. time()). PHP-Mock relies on PHP's namespace fallback policy. No further extension is needed.

36918.1M98](/packages/php-mock-php-mock)[phake/phake

The Phake mock testing library

4758.0M324](/packages/phake-phake)[php-mock/php-mock-integration

Integration package for PHP-Mock

1410.5M3](/packages/php-mock-php-mock-integration)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
