computablefacts / behat-contexts
Contexts ready to use with Behat.
Installs: 103
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:project
Requires
- php: >=7.1
- ext-json: ^1.5
- behat/mink-extension: ^2.3
- imbo/behat-api-extension: ^2.1
Requires (Dev)
- orchestra/testbench: ^3.8
- phpunit/phpunit: ^7.0
This package is auto-updated.
Last update: 2025-03-01 00:29:06 UTC
README
Different contexts ready to use with Behat for testing our projects.
This Behat context is inspire by Imbo Behat API Extension that is great to test REST API with Behat.
When using Laravel to develop a REST API, we want to be able to use Laravel testing framework (like Facade) but Imbo Behat API Extension use the Guzzle HTTP Client. It's why we create this Behat context that have the same Behat steps than Imbo Behat API Extension but use the Laracast Behat Laravel Extension to have access to the Laravel Framework.
Installation
The easiest way to install is by using Composer:
$> composer require --dev computablefacts/behat-contexts
Usage
ApiContext
It's the main class. You can extend this class for your Behat context:
<?php use ComputableFacts\Behat\Context\Laravel\ApiContext as CfApiContext; class ApiContext extends CfApiContext { // ... }
TODO