PHPackages                             bossa/phpspec2-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. bossa/phpspec2-expect

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

bossa/phpspec2-expect
=====================

Helper that decorates any SUS with a phpspec lazy object wrapper

3.1.3(6y ago)741.8M↓33.3%34[1 issues](https://github.com/BossaConsulting/phpspec2-expect/issues)20MITPHPPHP ^7.1CI failing

Since Aug 7Pushed 5y ago5 watchersCompare

[ Source](https://github.com/BossaConsulting/phpspec2-expect)[ Packagist](https://packagist.org/packages/bossa/phpspec2-expect)[ RSS](/packages/bossa-phpspec2-expect/feed)WikiDiscussions 3.x Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (16)Used By (20)

[![Build Status](https://camo.githubusercontent.com/32c0c7ba122827c036c95d91c88b6bf678b254f730f92600cffb90c698366a3e/68747470733a2f2f7472617669732d63692e6f72672f426f737361436f6e73756c74696e672f70687073706563322d6578706563742e7376673f6272616e63683d332e78)](https://travis-ci.org/BossaConsulting/phpspec2-expect)

phpspec2-expect
---------------

[](#phpspec2-expect)

Installation
============

[](#installation)

Install it using the `composer require` command:

```
   composer require --dev bossa/phpspec2-expect
```

Alternativelly you can add it to the `composer.json` file

```
{
    "require-dev": {
         "bossa/phpspec2-expect": "^3.0"
    },
    "config": {
        "bin-dir": "bin"
    },
    "minimum-stability": "dev",
    "autoload": {
        "psr-0": {
            "spec": "",
            "": "src"
        }
    }
}
```

Usage
=====

[](#usage)

Inside some example:

```
       expect(file_exists('crazyfile.xtn'))->toBe(true);
```

Roadmap
=======

[](#roadmap)

Version `2.x` supports PhpSpec 3 and PHP 5.6.

Version `3.0.x` requires PhpSpec 4, and therefore requires PHP 7.

Version `3.1.x` requires PhpSpec 5 and PHP 7.

These versions are all under active support.

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity53

Moderate usage in the ecosystem

Community40

Growing community involvement

Maturity66

Established project with proven stability

 Bus Factor2

2 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 ~172 days

Total

16

Last Release

2075d ago

Major Versions

1.0.3 → 2.0.02016-07-25

2.x-dev → 3.0.02017-07-31

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/70713?v=4)[md](/maintainers/md)[@md](https://github.com/md)

---

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)")[![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)")[![ptondereau](https://avatars.githubusercontent.com/u/4287777?v=4)](https://github.com/ptondereau "ptondereau (1 commits)")[![michaelperrin](https://avatars.githubusercontent.com/u/344445?v=4)](https://github.com/michaelperrin "michaelperrin (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)")[![blazej-pachut-gforces](https://avatars.githubusercontent.com/u/6972904?v=4)](https://github.com/blazej-pachut-gforces "blazej-pachut-gforces (1 commits)")

---

Tags

specificationBDDTDDspecSpecBDD

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bossa-phpspec2-expect/health.svg)

```
[![Health](https://phpackages.com/badges/bossa-phpspec2-expect/health.svg)](https://phpackages.com/packages/bossa-phpspec2-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)[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)[php-mock/php-mock

PHP-Mock can mock built-in PHP functions (e.g. time()). PHP-Mock relies on PHP's namespace fallback policy. No further extension is needed.

36918.1M98](/packages/php-mock-php-mock)

PHPackages © 2026

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