Skip to content

Instantly share code, notes, and snippets.

@asgrim
Last active May 1, 2017 15:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asgrim/7fb6b743c2c15427633c731532d8349b to your computer and use it in GitHub Desktop.
Save asgrim/7fb6b743c2c15427633c731532d8349b to your computer and use it in GitHub Desktop.
Example for using `ciaranmcnulty/behat-psr7extension` with a Zend Expressive app
<?php
declare(strict_types=1);
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
/** @var \Interop\Container\ContainerInterface $container */
$container = require __DIR__ . '/../config/container.php';
/** @var \Zend\Expressive\Application $app */
$app = $container->get('Zend\Expressive\Application');
return function (ServerRequestInterface $request) use ($app) : ResponseInterface
{
return $app->process($request, $app->getDefaultDelegate());
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment