kahlan
BDD testing framework for PHP
TLDR
SYNOPSIS
kahlan [options]
DESCRIPTION
Kahlan is a BDD testing framework for PHP. It uses a describe-it syntax similar to Jasmine and RSpec, with expect() matchers such as toBe, toEqual and toThrow.It supports stubbing and mocking of classes and functions, including monkey patching of core PHP functions without extensions, by patching source code on the fly when it is loaded. Built-in code coverage and several reporters are included, and runs are customized through a kahlan-config.php file.
PARAMETERS
--config=FILE
PHP configuration file (default: kahlan-config.php).--src=PATH
Source directories (default: src). Repeatable.--spec=PATH
Spec files or directories (default: spec). Repeatable.--grep=PATTERN
Shell wildcard for spec files (default: \*Spec.php and \*.spec.php).--reporter=NAME[:FILE]
Reporter: dot (default), bar, json, tap, tree or verbose; optionally redirected to a file. Repeatable.--coverage=LEVEL|SCOPE
Coverage report detail (0-4), or a namespace, class or method for a detailed report. Requires Xdebug or PCOV.--clover=FILE
Export coverage as Clover XML.--istanbul=FILE
Export coverage as istanbul-compatible JSON.--lcov=FILE
Export coverage in lcov format.--part=N/M
Run only part N of M, for parallel testing (default: 1/1).--ff=N
Fast fail after N failures; 0 means unlimited (default: 0).--no-colors
Disable colored output.--no-header
Do not print the header.--include=PATH, --exclude=PATH
Paths to include or exclude from code patching.--persistent=BOOL
Cache patched files (default: true).--cc
Clear the cache before running specs.--help
Display help information.--version
Print the Kahlan version.
CAVEATS
Usually installed per project via Composer, so the binary lives at vendor/bin/kahlan. Code coverage needs Xdebug or PCOV. The syntax differs from PHPUnit, so test suites are not interchangeable.
HISTORY
Kahlan was created by Simon Jaillet in 2013 and is developed on GitHub under the kahlan organization.
