computablefacts/behat-contexts

Contexts ready to use with Behat.

v0.3 2019-11-05 09:56 UTC

This package is auto-updated.

Last update: 2024-04-29 04:13:50 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