Download the PHP package ciaranmcnulty/behat-psr7extension without Composer
On this page you can find all versions of the php package ciaranmcnulty/behat-psr7extension. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package behat-psr7extension
PSR-7 Behat Driver
This is a proof of concept to show that Behat can drive a PSR-7 application without going via a webserver
It's currently built by combining:
- The existing Mink Browserkit driver, that can test a Symfony app
- The existing Symfony to PSR-7 bridge, to translate requests and resources back and forth
... and integrating into a behat extension
Usage
Install via composer and configure your behat.yml, specifying the php file that will bootstrap the app (see below):
You can then also modify your MinkExtension configuration to use the PSR-7 driver, e.g.:
Because there is no current standard interface for PSR-7-handling apps, you will need to select one of the following supported approaches.
Zend Expressive applications
Your configuration file will need to return your application file, bootstrapped. For example:
Slim applications
Your configuration file will need to return your application file, bootstrapped. For example:
All other PSR-7 applications
As long as you can write a function that takes a request and returns a response, you should be able to test your app. Your configuration file will need to return return a callable with the right signature. For example:
All versions of behat-psr7extension with dependencies
psr/http-message Version ^1.0
behat/mink-extension Version ^2.0
behat/mink-browserkit-driver Version ^1.0
symfony/http-kernel Version ^3.0
zendframework/zend-diactoros Version ^1.0
symfony/http-foundation Version ^3.0
symfony/psr-http-message-bridge Version ^1.0