PHPackages                             mougrim/phpunit-soft-mocks - 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. mougrim/phpunit-soft-mocks

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

mougrim/phpunit-soft-mocks
==========================

Simple running phpunit with soft-mocks

1.0.0-beta1(8y ago)171[1 PRs](https://github.com/mougrim/phpunit-soft-mocks/pulls)MITPHPPHP &gt;=5.5.0CI failing

Since Sep 8Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/mougrim/phpunit-soft-mocks)[ Packagist](https://packagist.org/packages/mougrim/phpunit-soft-mocks)[ RSS](/packages/mougrim-phpunit-soft-mocks/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (5)Versions (4)Used By (0)

The repository is archived
--------------------------

[](#the-repository-is-archived)

This repository has been archived. If you want to maintain it - just fork.

PHPUnit soft mocks
------------------

[](#phpunit-soft-mocks)

PHPUnit-soft-mocks is [Badoo soft-mocks](https://github.com/badoo/soft-mocks) wrapper for [PhpUnit](https://github.com/sebastianbergmann/phpunit). The wrapper is [\\Mougrim\\PhpunitSoftMocks\\TestCase](src/TestCase.php).

[![Latest Stable Version](https://camo.githubusercontent.com/b627c197ddbe7585b7ade1f1deb3f544d9378b31aa55f862fab31ae29a08e7eb/68747470733a2f2f706f7365722e707567782e6f72672f6d6f756772696d2f706870756e69742d736f66742d6d6f636b732f76657273696f6e)](https://packagist.org/packages/mougrim/phpunit-soft-mocks)[![Latest Unstable Version](https://camo.githubusercontent.com/c85dad2a8d4d23dd035b3c1e7c1c23ee0e278b158e4d88171facd75d82e20054/68747470733a2f2f706f7365722e707567782e6f72672f6d6f756772696d2f706870756e69742d736f66742d6d6f636b732f762f756e737461626c65)](https://packagist.org/packages/mougrim/phpunit-soft-mocks)[![License](https://camo.githubusercontent.com/bc9ffb2884abffb985b3ce91f54777c25d31d463f8add73f15f15c19f7c443df/68747470733a2f2f706f7365722e707567782e6f72672f6d6f756772696d2f706870756e69742d736f66742d6d6f636b732f6c6963656e7365)](https://packagist.org/packages/mougrim/phpunit-soft-mocks)[![Build Status](https://camo.githubusercontent.com/7d0cef13a81e294e3750945d11c1761e7bcd3ffc2775cf74332527a17426bb7b/68747470733a2f2f6170692e7472617669732d63692e6f72672f6d6f756772696d2f706870756e69742d736f66742d6d6f636b732e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/mougrim/phpunit-soft-mocks)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/7ef58de8a81b07f4d6497513aacb3f8ae8fa67fd9cb4ed15add76fac003ae90a/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d6f756772696d2f706870756e69742d736f66742d6d6f636b732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/mougrim/phpunit-soft-mocks/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/883c6909b4b273a3b4c4a4d34b185cf2db133a639bc866f666905f408ad3e4b3/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d6f756772696d2f706870756e69742d736f66742d6d6f636b732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/mougrim/phpunit-soft-mocks/?branch=master)

### Installation

[](#installation)

You can install PHPUnit-soft-mocks via [Composer](https://getcomposer.org/):

1. Add to composer.json (for patch phpunit packages): ```
    {
        "minimum-stability": "beta",
        "prefer-stable": true,
        "extra": {
            "enable-patching": true
        }
    }
    ```
2. Run: ```
    composer require --dev mougrim/phpunit-soft-mocks
    mkdir /tmp/mocks/ # create dir with soft-mocks cache
    ```

### Using

[](#using)

For using soft-mocks wrapper you can extend [\\Mougrim\\PhpunitSoftMocks\\TestCase](src/TestCase.php) class, see [example](tests/example/functional/ExampleTest.php).

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance57

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

3172d ago

### Community

Maintainers

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

---

Top Contributors

[![mougrim](https://avatars.githubusercontent.com/u/1057709?v=4)](https://github.com/mougrim "mougrim (12 commits)")

---

Tags

phpunitsoft-mocks

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/mougrim-phpunit-soft-mocks/health.svg)

```
[![Health](https://phpackages.com/badges/mougrim-phpunit-soft-mocks/health.svg)](https://phpackages.com/packages/mougrim-phpunit-soft-mocks)
```

###  Alternatives

[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[johnkary/phpunit-speedtrap

Find and report on slow tests in your PHPUnit test suite

78137.2M122](/packages/johnkary-phpunit-speedtrap)[spatie/phpunit-snapshot-assertions

Snapshot testing with PHPUnit

69417.9M510](/packages/spatie-phpunit-snapshot-assertions)[phpspec/prophecy-phpunit

Integrating the Prophecy mocking library in PHPUnit test cases

19254.9M1.4k](/packages/phpspec-prophecy-phpunit)[yoast/phpunit-polyfills

Set of polyfills for changed PHPUnit functionality to allow for creating PHPUnit cross-version compatible tests

18338.5M841](/packages/yoast-phpunit-polyfills)[ergebnis/phpunit-slow-test-detector

Provides facilities for detecting slow tests in phpunit/phpunit.

1468.1M72](/packages/ergebnis-phpunit-slow-test-detector)

PHPackages © 2026

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