highly extensible, highly enjoyable, BDD testing framework for PHP.
Testing with Peridot is natural. Write tests using the familiar
describe-it syntax. Easily and clearly describe how your code should behave in a language that makes sense. See getting started.
Peridot can be installed several ways:
Manual install (local)
Peridot uses the familiar
describe-it syntax to create a clear and readable testing language.
Usage: peridot [options] [files] Options: --grep (-g) Run tests matching <pattern> (default: *.spec.php) --no-colors (-C) Disable output colors --reporter (-r) Select which reporter to use (default: spec) --bail (-b) Stop on failure --configuration (-c) A php file containing peridot configuration --reporters List all available reporters --version (-V) Display the Peridot version number --help (-h) Display this help message.
Only run test files whose name matches the provided pattern. The default grep pattern is
Disable colors in output.
Select which reporter to use. This is the reporter name registered via ReporterFactory::register.
Tell peridot to stop running tests as soon as there is a failure.
A path to a peridot configuration file. Defaults to
getcwd() . '/peridot.php'
List available test reporters.
Example Test Suites
You can head over to the Peridot GitHub organization for plenty of examples using Peridot.
We would love to see other projects using Peridot, so if you have a project that uses it, we would love to know. Feel free to message us and let us know. We will gladly list your project on the site.
Running Peridot's tests
Peridot's tests were written using Peridot. After cloning Peridot, you can run tests using: