1. spec4php(1)
  2. Spec for PHP 0.9.3
  3. spec4php(1)

NAME

spec4php - cli runner

SYNOPSIS

spec4php <FILE>
spec4php <DIRECTORY>

DESCRIPTION

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).

SPEC FILES

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.

OPTIONS

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=regexp

Runs only the tests matching the given regular expression. You can specify this option multiple times to build complex expressions.

-g group, --group=group

Runs only the tests assigned to the given group or groups. Use commas to define multiple groups or specify this option multiple times.

--exclude-group=group

Do 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=group

Print a list of the available group names.

--format=format

The 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 file

Outputs the generated PHP code for a Spec file. If verbose mode is enabled it will print line numbers too.

EXAMPLES

BUGS

Please report bugs via GitHub's issue tracker

Spec for PHP is Copyright (C) 2011 Ivan -DrSlump- Montes http://pollinimini.net

SEE ALSO

spec4php(3), spec4php(5), http://github.com/drslump/spec-php

  1. Ivan -DrSlump- Montes
  2. August 2011
  3. spec4php(1)