a wire protocol server in php for cucumber
PHP Ruby
Latest commit bc2d80c Dec 6, 2013 @olbrich Merge pull request #23 from fred84/multibyteStepMatch
fix for argument position matching in multibyte definitions
Failed to load latest commit information.
lib fix for argument position matching in multibyte definitions Dec 4, 2013
tests/lib fix for argument position matching in multibyte definitions Dec 4, 2013
.document gem structure and some notice fixes Jan 22, 2011
HISTORY add support for a forking remote server Aug 30, 2011
Rakefile update rake file for package generation Aug 30, 2011
VERSION Version bump to 0.9.10 Sep 5, 2011
cucumber.yml fix table transforms May 8, 2011



This project implements the cucumber wire protocol for PHP projects. Information about the wire protocol: http://wiki.github.com/cucumber/cucumber/wire-protocol

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.


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.


  • 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



  • 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



This project utilizes PHPUnit because it has a robust set of assertions, has good mocking, and is widely used. This will facilitate adoption by developers who are already familiar with it.

This project was developed against the 5.2.x versions of PHP, to ensure compatibility with older PHP projects.


Support for this project was provided by iContact, inc. (http://www.icontact.com)