LinuxCommandLibrary

kahlan

BDD testing framework for PHP

TLDR

Run tests

$ kahlan
copy
Run specific spec
$ kahlan --spec=[spec/MySpec.php]
copy
Filter by pattern
$ kahlan --pattern="[*Spec.php]"
copy
Generate coverage
$ kahlan --coverage=[4]
copy
Output as reporter
$ kahlan --reporter=[dot|bar|verbose]
copy
Run with config
$ kahlan --config=[kahlan-config.php]
copy

SYNOPSIS

kahlan [options]

DESCRIPTION

Kahlan is a BDD testing framework for PHP. It uses a describe-it syntax similar to Jasmine/RSpec.
The tool supports mocking, stubbing, and code coverage. It focuses on behavior-driven development.

PARAMETERS

--spec PATH

Specific spec file/directory.
--pattern GLOB
File pattern.
--coverage LEVEL
Coverage level (1-4).
--reporter NAME
Output reporter.
--config FILE
Configuration file.
--help
Display help information.

CAVEATS

PHP-based. Different syntax from PHPUnit. Requires Composer.

HISTORY

Kahlan was created as a PHP testing framework with JavaScript-like BDD syntax and powerful mocking.

SEE ALSO

phpunit(1), phpspec(1), pest(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community