O'Reilly logo

Mastering PHP 7 by Branko Ajzele

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Writing test

Getting started with writing the Behat tests requires grasping a few basic concepts, such as the following:

  • Gherkin language: This is a whitespace, business-readable, domain-specific language created for behavior descriptions, with the ability to be used for a project’s documentation and automated test at once through its Given-When-Then concept. 
  • Features: This is a list of one or more scenarios saved under the *.feature file. By default, the Behat features are to be stored and found in the features/ directory relative to our project.
  • Scenarios: These are the core Gherkin structures, consisting of one or more steps.
  • Steps: These are also known as Givens, Whens, and Thens. Indistinguishable to Behat, they should be distinguishable to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required