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

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

phputil/kahlan
==============

Additional matchers for Kahlan

v0.3.0(2y ago)1281MITPHP

Since Sep 30Pushed 2y ago1 watchersCompare

[ Source](https://github.com/thiagodp/kahlan-matchers)[ Packagist](https://packagist.org/packages/phputil/kahlan)[ RSS](/packages/phputil-kahlan/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (5)Used By (1)

kahlan-matchers
===============

[](#kahlan-matchers)

> Additional matchers for [Kahlan](https://kahlan.github.io/)

Install
-------

[](#install)

> Requires PHP 7 and the extensions `pcre` and `mbstring`

```
composer require phputil/kahlan --dev
```

See [tips](tips.md) for help.

Matchers
--------

[](#matchers)

- Exception:
    - [toThrowAnExceptionThatMatches](spec/ToThrowAnExceptionThatMatches.spec.php) - compares an exception message with the given Regular Expression
    - [toThrowAnExceptionWithCode](spec/ToThrowAnExceptionWithCode.spec.php) - compares an exception code with the given code
    - [toThrowAnExceptionWithClassName](spec/ToThrowAnExceptionWithClassName.spec.php) - compares an exception name with the given class name
- String:
    - [toHaveStringLength](spec/ToHaveStringLength.spec.php) - compares a *multi-byte* string length with the given length

> Suggestions? Please [open an Issue](https://github.com/thiagodp/kahlan-matchers/issues).

License
-------

[](#license)

[MIT](LICENSE) © [Thiago Delgado Pinto](https://github.com/thiagodp)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

###  Release Activity

Cadence

Every ~76 days

Total

4

Last Release

733d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/154324d722a6ee9c252a0338329781084a97af2d0ea9faaf39176df5a689a2ec?d=identicon)[thiagodp](/maintainers/thiagodp)

---

Top Contributors

[![thiagodp](https://avatars.githubusercontent.com/u/2997844?v=4)](https://github.com/thiagodp "thiagodp (6 commits)")

### Embed Badge

![Health badge](/badges/phputil-kahlan/health.svg)

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

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)

PHPackages © 2026

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