Skip to content

Instantly share code, notes, and snippets.

@asgrim

asgrim/app.php

Last active May 1, 2017
Embed
What would you like to do?
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