spec4php
- cli runner
spec4php <FILE>
spec4php <DIRECTORY>
Spec4php runs the specified spec files and reports the results in the terminal. For information on how to create spec files please refer to spec4php(5).
The spec4php
command expects input files to contain PHP code with
describe and it blocks in it.
Giving a directory as argument, spec4php
will run all the files ending
with .spec.php
or Spec.php
it finds below that directory.
The following options (switches) are supported.
-h
, --help
Prints the usage help message and quits.
-v
, --verbose
Enables verbose mode. Additional information will be printed.
--debug
Enables debug mode. Stack traces will be shown unfiltered.
--color
=[auto|yes|no]Tells Spec if it should use colors when printing messages. By default (if the option is not set) it will use the auto mode, which will try to detect if it's safe to use ansi color sequences.
-f
regexp, --filter
=regexpRuns only the tests matching the given regular expression. You can specify this option multiple times to build complex expressions.
-g
group, --group
=groupRuns only the tests assigned to the given group or groups. Use commas to define multiple groups or specify this option multiple times.
--exclude-group
=groupDo not run the tests assigned to the given group or groups. Use commas to define multiple groups or specify this option multiple times.
--list-group
=groupPrint a list of the available group names.
--format
=formatThe formatter to use to present the result of the tests. The default formatter is dots, the other supported formatter is story.
-s
An alias for --format story
-b
, --beep
Turn on beep-on-failures, which will issue a beep sound for each failed test.
-d
file, --dump
fileOutputs the generated PHP code for a Spec file. If verbose mode is enabled it will print line numbers too.
Please report bugs via GitHub's issue tracker
Spec for PHP is Copyright (C) 2011 Ivan -DrSlump- Montes http://pollinimini.net
spec4php(3), spec4php(5), http://github.com/drslump/spec-php