HTTPS clone URL
Subversion checkout URL
Carter McKendry edited this page · 6 revisions
- 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