friends-of-behat / suite-settings-extension
Allows to overwrite suites' default settings.
Installs: 3 282 424
Dependents: 390
Suggesters: 0
Security: 0
Stars: 214
Watchers: 6
Forks: 3
Open Issues: 0
Language:Gherkin
Requires
- php: ^7.4 || ^8.0
- behat/behat: ^3.8
Requires (Dev)
This package is auto-updated.
Last update: 2024-11-05 22:26:27 UTC
README
Allows overwriting suites' default settings.
Usage
-
Install it:
composer require friends-of-behat/suite-settings-extension --dev
-
Enable and configure default suite settings in your Behat configuration:
# behat.yml default: # ... extensions: FriendsOfBehat\SuiteSettingsExtension: # the default configuration: paths: - "features" # default one! contexts: - "FeatureContext" # default one!
-
Every suite you create will have those settings as the default ones.
Configuration reference
paths
- an array, contains locations where Behat looks for*.feature
filescontexts
- an array, if there are no custom ones in suite configured, these are used
Protip!
If you've changed your paths
, that they do not contain features
anymore, your contexts
may be not loaded properly. To ensure this, pass the same folder to built-in autoloader
extension:
# behat.yml default: # ... autoload: - "%paths.base%/custom_features/bootstrap" # features -> custom_features extensions: FriendsOfBehat\SuiteSettingsExtension: paths: - "custom_features"