Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Behat is a BDD (behavior driven development) framework for PHP. With BDD, you write human-readable stories that describe the behavior of your application. These stories can then be auto-tested against your application. This tutorial describes how to install, configure and use Behat right from the PhpStorm IDE.

Error rendering macro 'toc' : [com.ctc.wstx.exc.WstxLazyException] com.ctc.wstx.exc.WstxParsingException: Undeclared namespace prefix "fb" at [row,col {unknown-source}]: [3,372]

Prerequisites

To make use of Behat, we first have to install it on our system. Read more about Behat installation in official documentation.

Installing Behat via Composer

A Composer package for Behat is available. A dependency can be added to composer.json using Composer Support in PhpStorm (recommended) or manually.

Use the Composer | Add dependency... context menu on your project and install behat/behat package:

Installing Behat with Phar package

You can either download behat.phar package from Behat GitHub repository, or install it in Settings | PHP | Behat | Download behat.phar from...

Run Configuration for Behat

Behat Intellisense

Resolve from step in Gherkin file to Context file

Find Usages from Context file to usages in Gherkin files

Keyword and step completion

Generation for undefined steps

  • No labels