PHPackages                             esperance/esperance-phpunit - 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. esperance/esperance-phpunit

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

esperance/esperance-phpunit
===========================

PHPUnit TestCase class integrated with Esperance assertion library.

v0.1.0(13y ago)190MITPHPPHP &gt;=5.3.2

Since Jul 1Pushed 13y agoCompare

[ Source](https://github.com/esperance/esperance-phpunit)[ Packagist](https://packagist.org/packages/esperance/esperance-phpunit)[ RSS](/packages/esperance-esperance-phpunit/feed)WikiDiscussions develop Synced 2w ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

Espérance PHPUnit Extension
===========================

[](#espérance-phpunit-extension)

PHPUnit TestCase class integrated with [Espérance](https://github.com/esperance/esperance) assertion library.

Usage
-----

[](#usage)

### Installation

[](#installation)

Before installation of Espérance-PHPUnit, PHPUnit should be installed.

Espérance-PHPUnit can be installed using [Composer](http://getcomposer.org/).

At first, save below as `composer.json` at the root of your project.

```
{
    "require": {
        "esperance/esperance-phpunit": "0.1.*"
    }
}
```

And run these commands.

```
$ wget http://getcomposer.org/composer.phar
$ php composer.phar install

```

Then Espérance would be installed in `./vendor` directory and also `./vendor/autoload.php` is generated.

### Writing tests with Espérance assertion

[](#writing-tests-with-espérance-assertion)

Just replace `PHPUnit_Framework_TestCase` with `\Esperance\PHPUnit\Testcase`.

Then `$this->expect()` method is available to specify subject for the test.

```
