<commit_before># RestApiExtension for Behat
* [Branch behat2](https://github.com/ubirak/rest-api-behat-extension/tree/behat-2.x) : **Behat 2.x**
* [Branch master](https://github.com/ubirak/rest-api-behat-extension/tree/master) : **Behat 3.x**

[![Build Status](https://travis-ci.org/ubirak/rest-api-behat-extension.png?branch=master)](https://travis-ci.org/ubirak/rest-api-behat-extension)

[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/ubirak/rest-api-behat-extension/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/ubirak/rest-api-behat-extension/?branch=master)

For now only JSON api is supported to analyze response, but you could use REST part to perform request on any type of api.

## Install

Require the package as a development dependency :

```sh
composer require --dev ubirak/rest-api-behat-extension
```

Don't forget to load the extension and the context if needed in your `behat.yml` :
```yaml
default:
    extensions:
        Ubirak\RestApiBehatExtension\Extension:
            rest:
                base_url: http://localhost:8888
                store_response: true
    suites:
        default:
            contexts:
                - Ubirak\RestApiBehatExtension\RestApiContext
                - Ubirak\RestApiBehatExtension\Json\JsonContext<commit_msg>Add mention about namespace change<commit_after># RestApiExtension for Behat
* [Branch behat2](https://github.com/ubirak/rest-api-behat-extension/tree/behat-2.x) : **Behat 2.x**
* [Branch master](https://github.com/ubirak/rest-api-behat-extension/tree/master) : **Behat 3.x**

[![Build Status](https://travis-ci.org/ubirak/rest-api-behat-extension.png?branch=master)](https://travis-ci.org/ubirak/rest-api-behat-extension)

[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/ubirak/rest-api-behat-extension/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/ubirak/rest-api-behat-extension/?branch=master)

For now only JSON api is supported to analyze response, but you could use REST part to perform request on any type of api.

## Warning

From version `7.0`, namespace vendor changed from `Rezzza` to `Ubirak`.

## Install

Require the package as a development dependency :

```sh
composer require --dev ubirak/rest-api-behat-extension
```

Don't forget to load the extension and the context if needed in your `behat.yml` :
```yaml
default:
    extensions:
        Ubirak\RestApiBehatExtension\Extension:
            rest:
                base_url: http://localhost:8888
                store_response: true
    suites:
        default:
            contexts:
                - Ubirak\RestApiBehatExtension\RestApiContext
                - Ubirak\RestApiBehatExtension\Json\JsonContext
{'fraction_non_alphanumeric': 0.12868731563421829, 'fraction_numerical': 0.00663716814159292, 'mean_word_length': 3.4113821138211384, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7159818', 'n_tokens_mistral': 909, 'n_tokens_neox': 875, 'n_words': 178}