Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xedi/laravel-behat
Behat Extension for Laravel and Lumen
https://github.com/xedi/laravel-behat
bdd behat behat-extension laravel laravel-behat lumen lumen-behat tdd
Last synced: 1 day ago
JSON representation
Behat Extension for Laravel and Lumen
- Host: GitHub
- URL: https://github.com/xedi/laravel-behat
- Owner: xedi
- License: mit
- Created: 2018-11-26T13:23:32.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-07-29T22:23:25.000Z (over 3 years ago)
- Last Synced: 2024-12-06T13:35:59.145Z (20 days ago)
- Topics: bdd, behat, behat-extension, laravel, laravel-behat, lumen, lumen-behat, tdd
- Language: PHP
- Homepage: https://xedi.com
- Size: 1.01 MB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# laravel-behat
Behat Extension compatible with both Laravel and Lumen---
## Getting Started
### Installation
Pull in the extension using composer
```bash
composer require xedi/laravel-behat --dev
```:information_source: **If you are using Lumen you will need to register the ServiceProvider yourself for access to the Artisan commands.**
```php
// bootstrap/app.php
if (class_exists("Xedi\\Behat\\ServiceProvider")) {
$app->register("Xedi\\Behat\\ServiceProvider");
}
```### Setup
Next you need to configure behat.
```bash
php artisan make:behat-yaml
```It is recommended that you use a `.env.behat` environment file and set the `LOG_DRIVER` to `single`.
Then, you need to initialize a behat within your repository.
```bash
vendor/bin/behat --init
```If everything is working, it will create a "features" directory within your repository.
### Running the tests
To run the test run behat as normal.
```bash
vendor/bin/behat
```Alternatively, you can run individual files:
```bash
vendor/bin/behat -- features/Example.feature
```You can also run specific Scenarios by specifying the line number it begins on:
```bash
vendor/bin/behat -- features/Example.feature:54
```For more information, check out the help documentation using the `--help` option