/phpunit-soft-mocks

Primary LanguagePHPMIT LicenseMIT

PHPUnit soft mocks

PHPUnit-soft-mocks is Badoo soft-mocks wrapper for PhpUnit. The wrapper is \Mougrim\PhpunitSoftMocks\TestCase.

Latest Stable Version Latest Unstable Version License Build Status Scrutinizer Code Quality Code Coverage

Installation

You can install PHPUnit-soft-mocks via Composer:

  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

For using soft-mocks wrapper you can extend \Mougrim\PhpunitSoftMocks\TestCase class, see example.