PHPackages                             jasonmccreary/pspec - 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. [Framework](/categories/framework)
4. /
5. jasonmccreary/pspec

ActiveLibrary[Framework](/categories/framework)

jasonmccreary/pspec
===================

PSpec is a modern, BDD-style testing framework for PHP.

v1.0.0-alpha(9y ago)19MITPHPPHP &gt;=5.5

Since Jun 30Pushed 9y agoCompare

[ Source](https://github.com/jasonmccreary/pspec)[ Packagist](https://packagist.org/packages/jasonmccreary/pspec)[ RSS](/packages/jasonmccreary-pspec/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

PSpec
=====

[](#pspec)

[![Build Status](https://camo.githubusercontent.com/0cad197de180f38cd26f10db3ef192b3f4beb561826a8f32f1ffea6f06d6d9ab/68747470733a2f2f7472617669732d63692e6f72672f6a61736f6e6d636372656172792f70737065632e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/jasonmccreary/pspec) [![Latest Stable Version](https://camo.githubusercontent.com/77699bbddbb8fdc46447bf598a07bcd7768dcc5762464aa22ea89a1088c98ec2/68747470733a2f2f706f7365722e707567782e6f72672f6a61736f6e6d636372656172792f70737065632f762f737461626c652e706e67)](https://packagist.org/packages/jasonmccreary/pspec)

PSpec is a modern, BDD-style testing framework for PHP - enabling you to write more readable tests using its simple, conversational DSL and expressive, fluent assertions.

```
describe('string functions', function () {
    describe('strtolower', function () {
        it('should return a string with all its characters lower case', function () {
            expect(strtolower('PSpec'))->toEqual('pspec');
        });
    });

    describe('strpos', function () {
        context('when needle is found', function () {
            it('should return the first character index of needle within haystack', function () {
                expect(strpos('PSpec', 'Spec'))->toBe(1);
            });
        });

        context('when needle is not found', function () {
            it('should return false', function () {
                expect(strpos('PSpec', 'PHP'))->toBeFalse();
            });
        });
    });
});
```

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

[](#installation)

Install PSpec as a **development** dependency to your project using [Composer](https://getcomposer.org):

```
composer require --dev jasonmccreary/pspec:1.*@alpha
```

Usage
-----

[](#usage)

Run your tests using the `pspec` command:

```
vendor/bin/pspec
```

Documentation
-------------

[](#documentation)

Documentation and additional examples will be available in the official release.

License
-------

[](#license)

PSpec is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

Thanks
------

[](#thanks)

PSpec was built atop [matura](https://github.com/jacobstr/matura) and heavily inspired by [RSpec](https://github.com/rspec/rspec-core) and [Jasmine](https://github.com/jasmine/jasmine). I want to recognize and thank these projects.

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 67.5% 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

Unknown

Total

1

Last Release

3646d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/92a6bfc994b500ee991e6a7c581fb07af26b68b85821ff354bed0ac786fc9211?d=identicon)[jasonmccreary](/maintainers/jasonmccreary)

---

Top Contributors

[![jacobstr](https://avatars.githubusercontent.com/u/70507?v=4)](https://github.com/jacobstr "jacobstr (77 commits)")[![jasonmccreary](https://avatars.githubusercontent.com/u/161071?v=4)](https://github.com/jasonmccreary "jasonmccreary (34 commits)")[![derekdowling](https://avatars.githubusercontent.com/u/613964?v=4)](https://github.com/derekdowling "derekdowling (2 commits)")[![gitter-badger](https://avatars.githubusercontent.com/u/8518239?v=4)](https://github.com/gitter-badger "gitter-badger (1 commits)")

---

Tags

frameworktestBDDTDD

### Embed Badge

![Health badge](/badges/jasonmccreary-pspec/health.svg)

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k532.1M19.4k](/packages/laravel-framework)[danielstjules/pho

A BDD testing framework

28220.2k7](/packages/danielstjules-pho)[letsdrink/ouzo

Ouzo PHP MVC framework

6810.7k1](/packages/letsdrink-ouzo)

PHPackages © 2026

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