https://github.com/neos/behat
hacktoberfest testing-tools
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/neos/behat
- Owner: neos
- Created: 2016-11-24T22:09:59.000Z (about 9 years ago)
- Default Branch: 9.0
- Last Pushed: 2025-05-01T09:10:49.000Z (9 months ago)
- Last Synced: 2025-06-03T00:31:11.523Z (7 months ago)
- Topics: hacktoberfest, testing-tools
- Language: PHP
- Homepage:
- Size: 163 KB
- Stars: 4
- Watchers: 3
- Forks: 13
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Project preparation
For running the Behat tests you will need some additional context.
* The context `Testing/Behat` is used inside the Behat feature context to boot flow.
### Resetting the database after each scenario.
By using the `FlowEntitiesTrait` and tagging the feature with `@flowEntities`, the doctrine tables will be dropped.
Make sure to create a new database for the Behat tests as otherwise your data will be lost.
## Example configuration
`Configuration/Testing/Behat/Settings.yaml`
```yaml
Neos:
Flow:
persistence:
backendOptions:
dbname: 'neos_testing_behat'
driver: pdo_mysql
user: ''
password: ''
```
### Migration from `neos/behat` < 9.0
Previously when including the `FlowContextTrait`, and tagging the feature with `@fixture`, it would clear the doctrine tables after each tests.
The new `FlowBootstrapTrait` doesn't handle this anymore, but one needs to use the `FlowEntitiesTrait` and tag the feature with `@flowEntities`
Previously we advised to install behat into a separate folder via `behat:setup`, but there is currently no need for this complexity.
Now we advise to simply install behat inside the same composer distribution.