Skip to content

jasonmccreary/pspec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PSpec

Build Status Latest Stable Version

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

Install PSpec as a development dependency to your project using Composer:

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

Usage

Run your tests using the pspec command:

vendor/bin/pspec

Documentation

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

License

PSpec is open-sourced software licensed under the MIT license.

Thanks

PSpec was built atop matura and heavily inspired by RSpec and Jasmine. I want to recognize and thank these projects.

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages