PHPackages                             friends-of-phpspec/phpspec-expect - 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. friends-of-phpspec/phpspec-expect

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

friends-of-phpspec/phpspec-expect
=================================

Helper that decorates any SUS with a phpspec lazy object wrapper

4.1.0(8mo ago)4369.9k↓25.7%320MITPHPPHP &gt;=8.1CI passing

Since Aug 7Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/friends-of-phpspec/phpspec-expect)[ Packagist](https://packagist.org/packages/friends-of-phpspec/phpspec-expect)[ RSS](/packages/friends-of-phpspec-phpspec-expect/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (3)Versions (19)Used By (20)

[![Latest Stable Version](https://camo.githubusercontent.com/0ff25058e06dd0d2a7dfef2cd1c9901d1fc3612667f7fb403aa97b75f344ab95/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f667269656e64732d6f662d706870737065632f706870737065632d6578706563742e737667)](https://packagist.org/packages/friends-of-phpspec/phpspec-expect)[![Total Downloads](https://camo.githubusercontent.com/8119d9951715687e5eab6df30610381770d8d3eab452580d4d16010fb91d614a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f667269656e64732d6f662d706870737065632f706870737065632d6578706563742e737667)](https://packagist.org/packages/friends-of-phpspec/phpspec-expect)[![Continuous Integration](https://github.com/friends-of-phpspec/phpspec-expect/actions/workflows/ci.yml/badge.svg)](https://github.com/friends-of-phpspec/phpspec-expect/actions/workflows/ci.yml)[![License](https://camo.githubusercontent.com/1f3d9f1e7201158352215ec1020dda22baf5858cec3f4792f0c941a27c22c313/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f667269656e64732d6f662d706870737065632f706870737065632d6578706563742e737667)](https://packagist.org/packages/friends-of-phpspec/phpspec-expect)

phpspec-expect
==============

[](#phpspec-expect)

Install
-------

[](#install)

Install this package as a development dependency in your project:

```
$ composer require --dev friends-of-phpspec/phpspec-expect

```

Usage
-----

[](#usage)

Inside some example:

```
expect(file_exists('dummy.txt'))->toBe(true);
```

Compatibility
-------------

[](#compatibility)

phpspec-expectPHPphpspec3.0.x`>=7.0``^4.0`3.1.x`^7.1``^5.0 || ^6.0`4.0.x`>=7.3``^6.0 || ^7.0`4.1.x`>=8.1``^7.0 || ^8.0`Authors
-------

[](#authors)

Copyright (c) 2017-2020 BossaConsulting ().

License
-------

[](#license)

Licensed under [MIT License](LICENSE).

###  Health Score

56

—

FairBetter than 98% of packages

Maintenance60

Regular maintenance activity

Popularity41

Moderate usage in the ecosystem

Community32

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor3

3 contributors hold 50%+ of commits

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 ~259 days

Recently: every ~509 days

Total

18

Last Release

251d ago

Major Versions

1.0.3 → 2.0.02016-07-25

2.3.0 → 3.0.02017-07-31

3.x-dev → 4.0.02021-01-20

PHP version history (3 changes)3.1.1PHP ^7.1

4.0.0PHP &gt;=7.3

4.1.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/4ab317af777924eeefe097aa3e0a423f069eaac20280e3241631e1a950e17f47?d=identicon)[shulard](/maintainers/shulard)

![](https://www.gravatar.com/avatar/5d7eebb96db1721780c3e38450c4408c15b3fde74daaefdd1412508224d4b7b5?d=identicon)[jaylinski](/maintainers/jaylinski)

---

Top Contributors

[![MarcelloDuarte](https://avatars.githubusercontent.com/u/144535?v=4)](https://github.com/MarcelloDuarte "MarcelloDuarte (30 commits)")[![mlopes](https://avatars.githubusercontent.com/u/654?v=4)](https://github.com/mlopes "mlopes (16 commits)")[![Sam-Burns](https://avatars.githubusercontent.com/u/6594039?v=4)](https://github.com/Sam-Burns "Sam-Burns (14 commits)")[![jakzal](https://avatars.githubusercontent.com/u/190447?v=4)](https://github.com/jakzal "jakzal (9 commits)")[![mcurran-inviqa](https://avatars.githubusercontent.com/u/5628533?v=4)](https://github.com/mcurran-inviqa "mcurran-inviqa (8 commits)")[![jaylinski](https://avatars.githubusercontent.com/u/1668766?v=4)](https://github.com/jaylinski "jaylinski (7 commits)")[![debo](https://avatars.githubusercontent.com/u/493257?v=4)](https://github.com/debo "debo (4 commits)")[![whisller](https://avatars.githubusercontent.com/u/164009?v=4)](https://github.com/whisller "whisller (3 commits)")[![ciaranmcnulty](https://avatars.githubusercontent.com/u/237866?v=4)](https://github.com/ciaranmcnulty "ciaranmcnulty (2 commits)")[![Nek-](https://avatars.githubusercontent.com/u/972456?v=4)](https://github.com/Nek- "Nek- (1 commits)")[![pawel-grzona](https://avatars.githubusercontent.com/u/285337?v=4)](https://github.com/pawel-grzona "pawel-grzona (1 commits)")[![ptondereau](https://avatars.githubusercontent.com/u/4287777?v=4)](https://github.com/ptondereau "ptondereau (1 commits)")[![thewilkybarkid](https://avatars.githubusercontent.com/u/1784740?v=4)](https://github.com/thewilkybarkid "thewilkybarkid (1 commits)")[![ubick](https://avatars.githubusercontent.com/u/904477?v=4)](https://github.com/ubick "ubick (1 commits)")[![michaelperrin](https://avatars.githubusercontent.com/u/344445?v=4)](https://github.com/michaelperrin "michaelperrin (1 commits)")[![blazej-pachut-gforces](https://avatars.githubusercontent.com/u/6972904?v=4)](https://github.com/blazej-pachut-gforces "blazej-pachut-gforces (1 commits)")

---

Tags

phpspecspecificationBDDTDDspecSpecBDD

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/friends-of-phpspec-phpspec-expect/health.svg)

```
[![Health](https://phpackages.com/badges/friends-of-phpspec-phpspec-expect/health.svg)](https://phpackages.com/packages/friends-of-phpspec-phpspec-expect)
```

###  Alternatives

[phpspec/phpspec

Specification-oriented BDD framework for PHP 7.1+

1.9k36.7M3.1k](/packages/phpspec-phpspec)[mockery/mockery

Mockery is a simple yet flexible PHP mock object framework

10.7k497.0M23.6k](/packages/mockery-mockery)[bossa/phpspec2-expect

Helper that decorates any SUS with a phpspec lazy object wrapper

741.8M87](/packages/bossa-phpspec2-expect)[codeception/codeception

All-in-one PHP Testing Framework

4.9k86.2M2.9k](/packages/codeception-codeception)[orchestra/testbench

Laravel Testing Helper for Packages Development

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

Testing Helper for Laravel Development

27043.7M310](/packages/orchestra-testbench-core)

PHPackages © 2026

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