Skip to content
Event driven BDD test framework for PHP
PHP Other
  1. PHP 99.7%
  2. Other 0.3%
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin Adds appveyor build Nov 29, 2016
fixtures
specs
src Updated Timer usage Nov 27, 2018
.gitignore
.scrutinizer.yml Tests now fail when an error occurs. Mar 11, 2016
.travis.yml
CHANGELOG.md Preparing for 1.19.0 release. Jan 19, 2017
CONTRIBUTING.md
LICENSE
Makefile Improved makefile for local use. Jan 6, 2017
README.md Update README.md to conform to kramdown Apr 14, 2017
RoboFile.php release 1.5.0 Nov 2, 2014
apigen.neon update doc path to include peridot scope Nov 16, 2014
appveyor.yml Fixing broken AppVeyor build. Jan 5, 2017
box.json Updated Box config. All vendor libs are now included, but you must co… Jan 19, 2017
composer.json
composer.lock Bumped versions Nov 27, 2018
logo.png
output-sample.png
peridot.php

README.md

Peridot logo

Packagist Version Build Status HHVM Build Status Windows Build Status Scrutinizer Code Quality Codecov Coverage Gitter Chat

The highly extensible, highly enjoyable, PHP testing framework.

Read more at peridot-php.github.io or head over to the wiki.

Building PHAR

Peridot's phar is built using Box. Once box is installed, the phar can be built using the following command from the project directory:

box build

Generating Peridot's documentation

Peridot API documentation is generated using apigen. Once apigen is installed, run the following command from the project directory:

apigen generate

This will output documentation to the docs/ directory.

Running Peridot's tests

Peridot's test suite can be run using Peridot:

$ bin/peridot

And a sample of output:

Peridot output sample

Release

We use Robo for releases.

robo release [version] [site-path]

using assert for expectations

Peridot sets ASSERT_CALLBACK via assert_options in order to throw exceptions when using the native assert function. Peridot specs are considered passing if they don't throw an exception; if you are using assert for expectations and you find your specs are triggering false positives, you may need to update zend.assertions to 1 in your php.ini. This is set to -1 by default in PHP 7+

If you aren't too keen on using assert for testing, there are a ton of assertion/expectation libraries out there. Anything that throws exceptions in response to a failed assertion will do. The peridot-php org has authored Leo, and this library offers a richer assertion vocabulary for testing.

You can’t perform that action at this time.