PHPackages                             komex/delusion - 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. komex/delusion

Abandoned → [komex/influence](/?search=komex%2Finfluence)Library[Testing &amp; Quality](/categories/testing)

komex/delusion
==============

Mock object instrument. Allows to mock and stub all not build-in objects and static classes.

1931PHP

Since Aug 29Pushed 12y ago1 watchersCompare

[ Source](https://github.com/komex/delusion)[ Packagist](https://packagist.org/packages/komex/delusion)[ RSS](/packages/komex-delusion/feed)WikiDiscussions develop Synced 4w ago

READMEChangelogDependenciesVersions (2)Used By (1)

About project
=============

[](#about-project)

Delusion is a testing instrument for programmers and quality engineers that helps them to test PHP projects by giving ability to mock and stub any objects in realtime. It's works only with projects which uses [Composer](http://getcomposer.org/).

[![Build Status](https://camo.githubusercontent.com/895d7382c83a6ef14967aa2c0acf22e8ad678f874721471e887bd01c4352e8e9/68747470733a2f2f7472617669732d63692e6f72672f6b6f6d65782f64656c7573696f6e2e706e673f6272616e63683d646576656c6f70)](https://travis-ci.org/komex/delusion)

Using
-----

[](#using)

Just add one line of code before all tests to get ability to do anything with all not build-in objects and static classes:

```
\Delusion\Delusion::injection();
```

After this injection all your classes will implements `\Delusion\ConfiguratorInterface`.

Installing
----------

[](#installing)

The installation of Delusion framework is very simple. All what you need to do is add `komex/delusion` to `require` or `require-dev` section in `composer.json` like this:

```
{
    "require-dev": {
        "komex/delusion": "dev-develop"
    }
}
```

Authors
-------

[](#authors)

This project was founded by [Andrey Kolchenko](https://github.com/komex) in August of 2013.

Support or Contact
------------------

[](#support-or-contact)

Having trouble with Delusion? Contact  and we’ll help you in the short time.

License
-------

[](#license)

[![Creative Commons License](https://camo.githubusercontent.com/2e47850e627609184fe5412d84bb63ab98727d1fd1ff5b534c73d0f174f32ea5/687474703a2f2f692e6372656174697665636f6d6d6f6e732e6f72672f6c2f62792d73612f332e302f38387833312e706e67)](http://creativecommons.org/licenses/by-sa/3.0/)
Unteist by [Andrey Kolchenko](https://github.com/komex) is licensed under a [Creative Commons Attribution-ShareAlike 3.0 Unported License](http://creativecommons.org/licenses/by-sa/3.0/).
Based on a work at .

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/8eec3e08123ce80baedf4965600a9980be3e84c23b6dc775468a647378a723b4?d=identicon)[komex](/maintainers/komex)

### Embed Badge

![Health badge](/badges/komex-delusion/health.svg)

```
[![Health](https://phpackages.com/badges/komex-delusion/health.svg)](https://phpackages.com/packages/komex-delusion)
```

###  Alternatives

[dms/phpunit-arraysubset-asserts

This package provides ArraySubset and related asserts once deprecated in PHPUnit 8

14429.2M359](/packages/dms-phpunit-arraysubset-asserts)[phpbenchmark/phpbenchmark

Easy to use benchmark toolkit for your PHP-application. This library contains classes for comparing algorithms as well as benchmarking application responses

8011.5k2](/packages/phpbenchmark-phpbenchmark)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
