ee64406cc2fd62a1a3fe4bb2652b8f0b7ee32965
Symfony Extension

Integrates Behat with Symfony (both 2 and 3). Inspired by Behat/Symfony2Extension.
Differences
- Built-in
symfonydriver uses different kernel than the one that is used in the contexts. This means you can always change it to any other driver without any issues and ensures that application behaviour will not be affected by stateful services.
Usage
-
Install it:
$ composer require friends-of-behat/symfony-extension --dev -
Enable and configure in your Behat configuration:
# behat.yml default: # ... extensions: FriendsOfBehat\SymfonyExtension: ~
Symfony 3 configuration
FriendsOfBehat\SymfonyExtension:
kernel:
bootstrap: 'var/bootstrap.php.cache'
path: app/AppKernel.php
class: 'AppKernel'
env: test
debug: true
Symfony 4 configuration
FriendsOfBehat\SymfonyExtension:
env_file: .env
kernel:
class: 'MyTrip\Kernel'
path: src/Kernel.php
debug: true
Symfony 4 does not have bootstrap file anymore and the environment is configured in the .env file.
- Good luck & have fun!
Languages
Gherkin
62.7%
PHP
37.3%