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

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

teamgantt/phony-kahlan
======================

Phony for Kahlan.

v1.0.1(1y ago)09.4k↑46.7%MITPHPPHP ^8.3

Since Nov 4Pushed 1y agoCompare

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

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

Phony for Kahlan

[![Current version image](https://camo.githubusercontent.com/0869d3a7f3f0ccec3ec6257b68ee03790f422cb50eb041ba5236744960a1a471/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7465616d67616e74742f70686f6e792d6b61686c616e2e7376673f7374796c653d666c61742d737175617265 "This project uses semantic versioning")](https://packagist.org/packages/teamgantt/phony-kahlan)

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

[](#installation)

```
composer require --dev teamgantt/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/teamgantt/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:

```
