Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Step definitions are stored in <code>features/step_definitions</code> and are what tells Cucumber what to do when it encounters statements like "Given I have 3 cucumbers in my belly":</p> <pre><code>Given /^I have (\d+) cucumbers in my belly$/ do |cukes| # Some Ruby code here end </code></pre> <p><a href="http://github.com/aslakhellesoy/cucumber/wiki/Step-Definitions" rel="nofollow">http://github.com/aslakhellesoy/cucumber/wiki/Step-Definitions</a></p> <p>To write your steps in PHP, just put them in <code>features/step_definitions</code> and configure your environment (<code>features/support/env.rb</code>) accordingly. There's good information in the form of a Cucumber feature for this in the Cucumber docs:</p> <p><a href="http://github.com/aslakhellesoy/cucumber/wiki/php" rel="nofollow">http://github.com/aslakhellesoy/cucumber/wiki/php</a></p> <p>A quick Google search also brought up the following article on PHP testing with Cucumber, Webrat and Selenium which looks pretty useful:</p> <p><a href="http://dev.af83.com/testing/acceptance-tests-php-project-cucumber-webrat-selenium-trio/2010/06/03" rel="nofollow">http://dev.af83.com/testing/acceptance-tests-php-project-cucumber-webrat-selenium-trio/2010/06/03</a></p> <p>Other languages that are not directly supported can use Cucumber's wire protocol, which is e.g. what Clucumber (Common Lisp) does:</p> <p><a href="http://github.com/aslakhellesoy/cucumber/wiki/wire-protocol" rel="nofollow">http://github.com/aslakhellesoy/cucumber/wiki/wire-protocol</a></p> <p>I don't do PHP, but I hope my answer still helps.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload