PHPackages                             jsiefer/mage-mock - 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. jsiefer/mage-mock

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

jsiefer/mage-mock
=================

Mock the Magento Framework

0.3.0(9y ago)796[1 issues](https://github.com/jsiefer/mage-mock/issues)MITPHP

Since Mar 23Pushed 9y ago1 watchersCompare

[ Source](https://github.com/jsiefer/mage-mock)[ Packagist](https://packagist.org/packages/jsiefer/mage-mock)[ RSS](/packages/jsiefer-mage-mock/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (3)Dependencies (2)Versions (5)Used By (0)

mage-mock
=========

[](#mage-mock)

Creating UnitTests for Magento classes can be hard considering that you have to extend from so many classes which in term require a lot of setup to get initialised in the first place.

The framework mocker will help you to mock the Magento environment.

The idea for a UnitTest here is that it...

- ...should run quickly (&lt;100ms)
- ...no Magento installation or source is required

All required Magento Classes are generated on the fly by the [class-mocker lib](https://github.com/jsiefer/class-mocker).

Setup
-----

[](#setup)

Simply load this project using composer:

```
composer require jsiefer/mage-mock

```

Create a PHPUnit `bootstrap.php` file and register the MagentMock to the ClassMocker and enable the ClassMocker.

```
