PHPackages                             sminnee/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. sminnee/phpunit-mock-objects

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

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

Mock Object library for PHPUnit (fork to add PHP 7.4 support to 3.4)

3.4.10(5y ago)1191.9k↓29.5%8BSD-3-ClausePHPPHP ^5.6 || ^7 || ^8

Since Jun 11Pushed 5y agoCompare

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

READMEChangelog (1)Dependencies (4)Versions (17)Used By (8)

[![Latest Stable Version](https://camo.githubusercontent.com/096586a6ff86493aff7e0fae9ed4cbfc9643fcb04de091be7b4ce41953a930d1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736d696e6e65652f706870756e69742d6d6f636b2d6f626a656374732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sminnee/phpunit-mock-objects)[![Minimum PHP Version](https://camo.githubusercontent.com/86e7d829a466cacd5658a22073e27d49d39dac72cc18216ac4963ed5463c5bbc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230352e362d3838393242462e7376673f7374796c653d666c61742d737175617265)](https://php.net/)[![Build Status](https://camo.githubusercontent.com/bd776a4fe8a4816d6471594f8a50900d8883dbb4b6c67cabd7f9a922ef384490/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f736d696e6e65652f706870756e69742d6d6f636b2d6f626a656374732f332e342e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/sminnee/phpunit-mock-objects)

PHPUnit\_MockObject
===================

[](#phpunit_mockobject)

**PHPUnit\_MockObject** is the default mock object library for PHPUnit.

**This is a fork of the original project to provide support for newer PHP versions to PHPUnit 5.**

Requirements
------------

[](#requirements)

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

Installation
------------

[](#installation)

You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/):

```
composer require phpunit/phpunit-mock-objects

```

If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:

```
composer require --dev phpunit/phpunit-mock-objects

```

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community27

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 79.9% 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 ~160 days

Recently: every ~110 days

Total

13

Last Release

2064d ago

Major Versions

2.3.4 → 3.4.02016-10-09

PHP version history (3 changes)2.3.4PHP &gt;=5.3.3

3.4.0PHP ^5.6 || ^7.0

3.4.8PHP ^5.6 || ^7 || ^8

### Community

Maintainers

![](https://www.gravatar.com/avatar/be6648e60fbab6f70bfc34dd8c14259562d28a47510a934ea9c01fe98633f3c2?d=identicon)[sminnee](/maintainers/sminnee)

---

Top Contributors

[![sebastianbergmann](https://avatars.githubusercontent.com/u/25218?v=4)](https://github.com/sebastianbergmann "sebastianbergmann (623 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)")[![giorgiosironi](https://avatars.githubusercontent.com/u/160299?v=4)](https://github.com/giorgiosironi "giorgiosironi (7 commits)")[![trowski](https://avatars.githubusercontent.com/u/1628287?v=4)](https://github.com/trowski "trowski (6 commits)")[![nicolas-grekas](https://avatars.githubusercontent.com/u/243674?v=4)](https://github.com/nicolas-grekas "nicolas-grekas (6 commits)")[![lcobucci](https://avatars.githubusercontent.com/u/201963?v=4)](https://github.com/lcobucci "lcobucci (6 commits)")[![ThomasWeinert](https://avatars.githubusercontent.com/u/236825?v=4)](https://github.com/ThomasWeinert "ThomasWeinert (6 commits)")[![makasim](https://avatars.githubusercontent.com/u/143206?v=4)](https://github.com/makasim "makasim (5 commits)")[![fabian](https://avatars.githubusercontent.com/u/13346?v=4)](https://github.com/fabian "fabian (5 commits)")[![prolic](https://avatars.githubusercontent.com/u/394428?v=4)](https://github.com/prolic "prolic (4 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (4 commits)")[![ksimka](https://avatars.githubusercontent.com/u/1818850?v=4)](https://github.com/ksimka "ksimka (4 commits)")[![lstrojny](https://avatars.githubusercontent.com/u/79707?v=4)](https://github.com/lstrojny "lstrojny (3 commits)")[![Vinai](https://avatars.githubusercontent.com/u/72463?v=4)](https://github.com/Vinai "Vinai (3 commits)")[![lapistano](https://avatars.githubusercontent.com/u/95115?v=4)](https://github.com/lapistano "lapistano (3 commits)")[![remicollet](https://avatars.githubusercontent.com/u/270445?v=4)](https://github.com/remicollet "remicollet (3 commits)")[![sawmurai](https://avatars.githubusercontent.com/u/6454986?v=4)](https://github.com/sawmurai "sawmurai (3 commits)")[![roman-shuhov](https://avatars.githubusercontent.com/u/1341678?v=4)](https://github.com/roman-shuhov "roman-shuhov (2 commits)")[![tzi](https://avatars.githubusercontent.com/u/415891?v=4)](https://github.com/tzi "tzi (2 commits)")

---

Tags

mockxunit

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/sminnee-phpunit-mock-objects/health.svg)](https://phpackages.com/packages/sminnee-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)
