https://github.com/friendsofbehat/suitesettingsextension
:paperclip: Allows to overwrite suites' default settings.
https://github.com/friendsofbehat/suitesettingsextension
behat behat-extension php
Last synced: 9 months ago
JSON representation
:paperclip: Allows to overwrite suites' default settings.
- Host: GitHub
- URL: https://github.com/friendsofbehat/suitesettingsextension
- Owner: FriendsOfBehat
- License: mit
- Created: 2016-07-22T21:18:47.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-02-05T14:35:33.000Z (almost 5 years ago)
- Last Synced: 2025-04-23T06:17:10.124Z (9 months ago)
- Topics: behat, behat-extension, php
- Language: Gherkin
- Homepage:
- Size: 30.3 KB
- Stars: 214
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Suite Settings Extension [](https://packagist.org/packages/friends-of-behat/suite-settings-extension) [](https://packagist.org/packages/friends-of-behat/suite-settings-extension) [](http://travis-ci.org/FriendsOfBehat/SuiteSettingsExtension) [](https://scrutinizer-ci.com/g/FriendsOfBehat/SuiteSettingsExtension/)
Allows overwriting suites' default settings.
## Usage
1. Install it:
```bash
composer require friends-of-behat/suite-settings-extension --dev
```
2. Enable and configure default suite settings in your Behat configuration:
```yaml
# behat.yml
default:
# ...
extensions:
FriendsOfBehat\SuiteSettingsExtension: # the default configuration:
paths:
- "features" # default one!
contexts:
- "FeatureContext" # default one!
```
3. Every suite you create will have those settings as the default ones.
## Configuration reference
- `paths` - an array, contains locations where Behat looks for `*.feature` files
- `contexts` - 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:
```yaml
# behat.yml
default:
# ...
autoload:
- "%paths.base%/custom_features/bootstrap" # features -> custom_features
extensions:
FriendsOfBehat\SuiteSettingsExtension:
paths:
- "custom_features"
```