Download the PHP package twentytwo-labs/behat-open-api without Composer
On this page you can find all versions of the php package twentytwo-labs/behat-open-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download twentytwo-labs/behat-open-api
More information about twentytwo-labs/behat-open-api
Files in twentytwo-labs/behat-open-api
Download twentytwo-labs/behat-open-api
More information about twentytwo-labs/behat-open-api
Files in twentytwo-labs/behat-open-api
Please rate this library. Is it a good library?
Informations about the package behat-open-api
Behatch contexts
Behat Open Api contexts provide most common Api Behat tests.
Installation
This extension requires:
- Behat 3+
- Mink extension
Project dependency
- Install Composer
-
Require the package with Composer:
- Activate extension by specifying its class in your
behat.yml
:
Usage
In behat.yml
, enable desired contexts:
Examples
-
TwentytwoLabs\BehatOpenApiExtension\Context\DebugContext
@Then print last response headers
@Then print profiler link
TwentytwoLabs\BehatOpenApiExtension\Context\JsonContext
@Then the response should be in JSON
@Then the response should not be in JSON
@Then the JSON node :node should be equal to :text
@Then the JSON nodes should be equal to:
@Then the JSON node :node should match :pattern
@Then the JSON node :node should be null
@Then the JSON node :node should not be null
@Then the JSON node :node should be true
@Then the JSON node :node should be false
@Then the JSON node :node should be equal to the string :text
@Then the JSON node :node should be equal to the number :number
@Then the JSON node :node should have :count element(s)
@Then the JSON node :node should contain :text
@Then the JSON node :node should not contain :text
@Then the JSON node :name should exist
@Then the JSON node :name should not exist
@Then the JSON should be equal to:
-
This step link to [Array-comparator](https://github.com/TwentytwoLabs/array-comparator package)
TwentytwoLabs\BehatOpenApiExtension\Context\OpenApiContext
@Then the response should be valid according to the operation id :operationId
TwentytwoLabs\BehatOpenApiExtension\Context\RestContext
@Then I add :name header equal to :value
@Given I send a :method request to :path
@Then /^the response status code should be equal to (?P<code>\d+)$/
@Then the response should be empty
@Then the header :name should be equal to :value
@Then the header :name should not be equal to :value
@Then the header :name should contain :value
@Then the header :name should not contain :value
@Then the header :name should not exist
@Then the header :name should match :regex
@Then the header :name should not match :regex
@Then the response should expire in the future
@Then the response should be encoded in :encoding
All versions of behat-open-api with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.0
ext-json Version *
ext-mbstring Version *
behat/behat Version ^3.0
friends-of-behat/mink-extension Version ^2.6
guzzlehttp/psr7 Version ^2.3
symfony/http-foundation Version ^4.0|^5.0|^6.0
symfony/property-access Version ^4.0|^5.0|^6.0
symfony/serializer Version ^4.0|^5.0|^6.0
twentytwo-labs/api-validator Version ^1.0
twentytwo-labs/array-comparator Version ^1.0
ext-json Version *
ext-mbstring Version *
behat/behat Version ^3.0
friends-of-behat/mink-extension Version ^2.6
guzzlehttp/psr7 Version ^2.3
symfony/http-foundation Version ^4.0|^5.0|^6.0
symfony/property-access Version ^4.0|^5.0|^6.0
symfony/serializer Version ^4.0|^5.0|^6.0
twentytwo-labs/api-validator Version ^1.0
twentytwo-labs/array-comparator Version ^1.0
The package twentytwo-labs/behat-open-api contains the following files
Loading the files please wait ....