PHPackages                             belanur/mokka - 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. belanur/mokka

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

belanur/mokka
=============

Mokka PHP Mocking Framework

4342[3 issues](https://github.com/belanur/mokka/issues)PHP

Since May 9Pushed 11y ago3 watchersCompare

[ Source](https://github.com/belanur/mokka)[ Packagist](https://packagist.org/packages/belanur/mokka)[ RSS](/packages/belanur-mokka/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

\#Mokka PHP Mocking Framework [![Build Status](https://camo.githubusercontent.com/27e78a72b30e7e25f22296dcf8f2f7b42f7874b9d26d0c23bd7cc4cd8cfe3514/68747470733a2f2f7472617669732d63692e6f72672f62656c616e75722f6d6f6b6b612e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/belanur/mokka)[!\[Gitter\](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/belanur/mokka?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

The goal of Mokka is to provide a lightweight framework for creating mocks and stubs. It's syntax is heavily inspired by the [Mockito Framework](https://code.google.com/p/mockito/).

Documentation can be found on [readthedocs.org](http://mokka.readthedocs.org).

\##Prerequisites

Mokka needs PHP 5.4.0+. PHP 5.5.0+ is recommended.

\##Installing with composer

Simply add belanur/mokka to the `composer.json` of your project. Since there are no stable versions yet, you'll have to use "dev-master":

```
{
  "require-dev": {
    "belanur/mokka": "dev-master"
  }
}
```

\##Building a Phar

Note: Make sure to have `phar.readonly = Off` in your php.ini. Otherwise building Phars is not possible.

You can run `php build/buildPhar.php` to build a Phar package. It will be put in `/build/mokka.phar`. You can then include it in your projects:

```
