README.md

cuke4php

Using this protocol it is possible to directly interact with PHP code at any level without the need for a web server. To accomplish this, when cucumber is running against a directory containing feature files and it cannot resolve a particular step definition, it will ask a known wire server (as defined in a .wire file) to interpret and run those steps.

Install

To install Cuke4Php, follow these steps:

[sudo] gem install cuke4php

Note: I realize the irony inherent in a gem being used to distribute PHP code.

Usage

run 'cuke4php path/to/features' from the command line

all parameters get passed to cucumber when it starts, but the last parameter on the command line should be the path to your features directory

make sure your cucumber features has a 'Cuke4Php.wire' file in step_definitions containing something like:

host: localhost
port: <%= ENV['CUKE4PHP_PORT'] %>

you can write both Ruby and PHP steps

you must require the PHPUnit library from a file in your features/support/ directory (e.g., features/support/Env.php) for cuke4php to work

Roadmap

bin/cuke4php

support an option like 'cuke4php --init' which will generate the directory structure and support files necessary to use cuke4php with a php project.

lint check all php files in features directory before starting the cuke4php server