IntelliJ IDEA 2017.1 Help

Behat

File | Settings | Languages and Frameworks | PHP | Behat for Windows and Linux
IntelliJ IDEA | Preferences | Languages and Frameworks | PHP | Behat for macOS
Ctrl+Alt+S

/help/img/idea/2017.1/settings.png

This page is available only when the PHP and Behat plugins are installed and enabled. The plugins are not bundled with IntelliJ IDEA, but they can be installed from the JetBrains plugin repository as described in Installing, Updating and Uninstalling Repository Plugins and Enabling and Disabling Plugins. Once enabled, the plugins are available at the IDE level, that is, you can use them in all your IntelliJ IDEA projects.

Before you start, make sure the PHP interpreter is configured in IntelliJ IDEA on the PHP page, as described in Configuring Local PHP Interpreters and Configuring Remote PHP Interpreters.

On this page, configure installations of the Behat framework available through configured local and remote PHP interpreters and thus enable behaviour-driven development in IntelliJ IDEA. The page consists of two panes:

PHP interpreters

The central pane of the page shows a list of configured PHP interpreters that are associated with Behat installations. The list contains at least one item (Local) which cannot be removed. The contents of the right-hand pane depend on the type of the selected interpreter.

  • To add a remote interpreter to the list, click /help/img/idea/2017.1/new.png on the toolbar of the pane and choose the relevant interpreter in the Behat by remote interpreter dialog that opens. Then specify the details of the Behat installation to use with this interpreter.
  • To remove a remote interpreter from the list, select the relevant interpreter and click /help/img/idea/2017.1/delete.png. The Behat configuration associated with the interpreter is also removed.

See Configuring Remote PHP Interpreters for details.

Behat configuration

ItemDescription
CLI Interpreter This area shows:
  • The remote PHP CLI Interpreter to use Behat with. The field is read-only, to update the chosen interpreter configuration or create a new one, click the /help/img/idea/2017.1/browseButton.png whereupon IntelliJ IDEA brings you to the Interpreters dialog box.
  • The Path Mappings between your local sources and the sources inside the Vagrant instance, or the Docker container, or on the remote host.
  • The Docker container settings that will be used to start the container from an image. These settings may include the volume configuration, the exposed port, the network, etc.
In most cases, IntelliJ IDEA detects the path mappings and the container settings and fills in all the fields automatically. Alternatively, click the /help/img/idea/2017.1/browseButton.png next to the field in question and specify the settings manually. See Configuring Remote PHP Interpreters for details.

The field is read-only, to update the chosen interpreter configuration or create a new one, click the /help/img/idea/2017.1/browseButton.png whereupon IntelliJ IDEA brings you to the Interpreters dialog box.

Behat Library In this area, specify the Behat installation to use.
  • Path to Behat executable: in this text box, specify the location of the behat.phar archive or the folder with the Behat executable file. Behat does not necessarily have to be installed under the current project root. You can type the path manually or click the /help/img/idea/2017.1/browseButton.png button and choose the relevant location in the dialog box that opens.
  • Behat releases: click this link to navigate to the Codeception repository on github where you can choose the relevant version of codeception.phar archive.
  • Behat version: this read-only field shows the version of the specified Behat installation. IntelliJ IDEA detects the version when you click the Refresh icon /help/img/idea/2017.1/refresh.png. The default value is Not installed
Test Runner In this area, appoint the configuration .yml file to use for launching and executing scenarios.

By default, Behat looks for a behat.yml configuration file in the project root folder or in the config folder. You can appoint a custom configuration file.

  • Default configuration file: select this check box to specify your own .yml configuration file. This file will be later used as default in all Behat run/debug configurations.

    In the text box, specify the location of the configuration file to use. Type the path manually or click the /help/img/idea/2017.1/browseButton.png button and choose the file in the dialog box that opens.

    Clear the check box to have Behat use the behat.yml configuration file from the project root folder or from the config folder. If no such file is found, test execution fails, therefore it may be more reliable to specify the configuration file explicitly.

See Also

Last modified: 5 April 2017