integrated / behat-extensions
Integrated Behat extensions for FeatureContext files
Installs: 2 141
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 5
Forks: 0
Open Issues: 0
Requires
- behat/mink-browserkit-driver: ^1.3
- behat/mink-extension: ^2.2
- behat/symfony2-extension: ^2.1
- phpunit/phpunit: ^5.7
- symfony/swiftmailer-bundle: ^2.5|^3.2
Requires (Dev)
- phpunit/phpunit: ^5.7
- squizlabs/php_codesniffer: ^2.8
This package is not auto-updated.
Last update: 2024-12-17 04:43:47 UTC
README
This bundle enhances FeatureContext classes with traits for Behat with Mink
Requirements
- See the require section in the composer.json
Documentation
Installation
This bundle can be installed following these steps:
Install using composer
$ composer require integrated/integrated-behat-extensions:master
Configuration
The extensions require a autoload path to be defined in the configuration of Behat.
// behat.yml
default:
...
autoload:
"" : %paths.base%/features/bootstrap
"Integrated\\Behat" : %paths.base%/vendor/integrated/behat-extensions/src
...
In order to be able to catch mails send from the Symfony application the spool of Swiftmailer must be written to a directory.
// app/config/config_test.yml
...
swiftmailer:
disable_delivery: true
spool:
type: file
path: %kernel.cache_dir%/spool
Using Extensions
All extensions that enhance your FeatureContext class are in the Extension folder of the project. The other classes are used in an supporting way of the extensions. Depending on the extension type abstract methods are be defined in the trait. There mostly are declared within the MinkContext.
Example
The traits are placed within the FeatureContext class.
// features/bootstrap/FeatureContext.php
...
use Integrated/Behat/Extension/Login/SymfonyLogin;
...
class FeatureContext extends MinkContext implements Context
{
use SymfonyLogin;
...
License
This bundle is under the MIT license. See the complete license in the bundle:
LICENSE
Contributing
Pull requests are welcome. Please see our CONTRIBUTING guide.
About
This bundle is part of the Integrated project. You can read more about this project on the Integrated for Developers website.