This is a PSR-7 adapter for Mink drivers, for use with Behat. It is a work in progress. Pull requests welcome.
$driver = new \Behat\Mink\Driver\GoutteDriver(); // or any kind of Mink driver
$psr7MinkAdapter = new \SamBurns\MinkPsr7\Psr7Adapter($driver);
$response = $psr7MinkDriver->doRequest($request);
// ^ taking Psr\Http\Message\ServerRequestInterface, returning ...\ResponseInterface.
All contributions welcome. After cloning the repository and running Composer, you can run the tests like this:
./tests/run_tests.sh
It will spin up a real webserver with php -S
. PHPUnit will then run, sending requests to the server and checking the request headers etc. that were received.