PHPackages                             eloquent/phony-kahlan - 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. eloquent/phony-kahlan

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

eloquent/phony-kahlan
=====================

Phony for Kahlan.

4.0.0(5y ago)576.9k320MITPHPPHP ^7.3 || ^8

Since Jul 13Pushed 2y ago1 watchersCompare

[ Source](https://github.com/eloquent/phony-kahlan)[ Packagist](https://packagist.org/packages/eloquent/phony-kahlan)[ Docs](http://eloquent-software.com/phony/)[ RSS](/packages/eloquent-phony-kahlan/feed)WikiDiscussions master Synced today

READMEChangelog (8)Dependencies (8)Versions (10)Used By (20)

> # No longer maintained
>
> [](#no-longer-maintained)
>
> This package is no longer maintained. See [this statement](https://gist.github.com/ezzatron/713a548735febe3d76f8ca831bc895c0) for more info.

Phony for Kahlan
================

[](#phony-for-kahlan)

[![Current version image](https://camo.githubusercontent.com/8e889b3c2c3f78e3f921af43bfb10b264a996a40169229796ba8f033724fe300/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656c6f7175656e742f70686f6e792d6b61686c616e2e7376673f7374796c653d666c61742d737175617265 "This project uses semantic versioning")](https://packagist.org/packages/eloquent/phony-kahlan)

Installation
------------

[](#installation)

```
composer require --dev eloquent/phony-kahlan

```

See also
--------

[](#see-also)

- Read the [documentation](http://eloquent-software.com/phony/latest/).
- Read the [Kahlan documentation](https://kahlan.github.io/docs/).
- Visit the [main Phony repository](https://github.com/eloquent/phony).

What is *Phony for Kahlan*?
---------------------------

[](#what-is-phony-for-kahlan)

*Phony for Kahlan* is a plugin for the [Kahlan](https://kahlan.github.io/docs/) testing framework that provides general integration with the [Phony](http://eloquent-software.com/phony/latest/) mocking framework, as well as optional auto-wired test dependencies.

In other words, if a [Kahlan](https://kahlan.github.io/docs/) test (or suite) requires a mock object, it can be defined to have a parameter with an appropriate [type declaration](http://php.net/functions.arguments#functions.arguments.type-declaration), and it will automatically receive a mock of that type as an argument when run.

[Stubs](http://eloquent-software.com/phony/latest/#stubs) for `callable` types, and "empty" values for other type declarations are also [supported](#supported-types).

Plugin installation
-------------------

[](#plugin-installation)

Installation is only required when using the [dependency injection](#dependency-injection) features of the plugin. The plugin can be installed in the [Kahlan configuration file](https://kahlan.github.io/docs/config-file.html) like so:

```
