Skip to content
This repository has been archived by the owner on Dec 28, 2021. It is now read-only.
Carter McKendry edited this page May 9, 2013 · 6 revisions

Cuke4php is a wire protocol implementation of Cucumber written in PHP.

Getting Started

  • Install PHP (5.2.7+)
  • Install ruby and rubygems (I recommend using rvm for this).
  • Install the cuke4php gem
    [sudo] gem install cuke4php

    NOTE: don’t sudo it if you are using rvm. The cuke4php gem depends on cucumber, so this will also install cucumber and it’s dependencies by default.
  • Install the PHPUnit PEAR package.
  • create the standard cucumber directory structure within your project
    features/
      step_definitions/
      support/
    
  • create a file named ‘cuke4php.wire’ in your step_definitions directory containing the following text
    host: localhost
    port: 16816

    As of cucumber 0.10.2, you can now use erb templating in your .wire file….
    host: localhost
    port: <%= ENV['CUKE4PHP_PORT'] %>
    
  • In the support directory, create a file named ‘Env.php’. (The exact name does not matter so long as it’s a php file.)
  • The Env.php file must require the PHPUnit library (from the PEAR package or elsewhere as your install requires).
  • Create a feature file in the /features directory (with a .feature extension).
  • run cuke4php
    cuke4php <cucumber_options> path/to/features
Clone this wiki locally