PHPUnit-soft-mocks is Badoo soft-mocks wrapper for PhpUnit. The wrapper is \Mougrim\PhpunitSoftMocks\TestCase.
You can install PHPUnit-soft-mocks via Composer:
- Add to composer.json (for patch phpunit packages):
{ "minimum-stability": "beta", "prefer-stable": true, "extra": { "enable-patching": true } }
- Run:
composer require --dev mougrim/phpunit-soft-mocks mkdir /tmp/mocks/ # create dir with soft-mocks cache
For using soft-mocks wrapper you can extend \Mougrim\PhpunitSoftMocks\TestCase class, see example.