• Stars
    star
    328
  • Rank 128,005 (Top 3 %)
  • Language
    PHP
  • License
    MIT License
  • Created about 10 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Event driven BDD test framework for PHP

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.

More Repositories

1

leo

Next level assertion and matcher library for PHP
PHP
35
star
2

webdriver-manager

Standalone library and command line tool for managing Selenium WebDriver
PHP
35
star
3

peridot-concurrency

Concurrent spec runner for Peridot
PHP
12
star
4

event-emitter

A very simple event dispatching library for PHP.
PHP
9
star
5

object-path

A string syntax to fetch values from array and object hierarchies
PHP
9
star
6

peridot-dsl-example

Demonstrating a custom test DSL with Peridot
PHP
7
star
7

peridot-httpkernel-plugin

A Peridot plugin to simplify testing HttpKernel applications
PHP
4
star
8

leo-http-foundation

A leo extension for writing assertions against HttpFoundation
PHP
4
star
9

peridot-prophecy-plugin

Add prophecy to your peridot tests and auto inject mocks
PHP
4
star
10

peridot-core

Flexible test hierarchies
PHP
3
star
11

peridot-jumpstart

Starter kit to start BDD testing in PHP with Peridot
PHP
3
star
12

bowling-kata

The bowling kata in Peridot, phpspec, and PHPUnit
PHP
3
star
13

peridot-watcher-plugin

Watch tests for changes and re-run them
PHP
2
star
14

peridot-dot-reporter

A dot style reporter for the Peridot testing framework
PHP
2
star
15

peridot-doctrine-plugin

Easily integrate Doctrine ORM tests with Peridot BDD.
PHP
2
star
16

peridot-cli

The Peridot command line interface
PHP
1
star
17

peridot-list-reporter

A list reporter for the Peridot testing framework
PHP
1
star
18

peridot-reporters

Event driven reporters
PHP
1
star
19

peridot-scope

Scopes for function binding and mixins
PHP
1
star
20

peridot-yo-plugin

Notify the right people when tests pass or fail via the world's simplest messaging platform - Yo
PHP
1
star
21

peridot-php.github.io

The Peridot website
HTML
1
star
22

peridot-code-coverage-reporters

Code coverage reporters for Peridot.
PHP
1
star
23

peridot-in-action

A presentation on Peridot used in a full BDD testing stack for the GrPHPDev group
JavaScript
1
star
24

peridot-dsls

Test languages for Peridot
PHP
1
star
25

peridot-scope-example

Demonstrating child scopes in Peridot by mixing in webdriver capabilities
PHP
1
star