Last active
May 1, 2017 15:13
-
-
Save asgrim/7fb6b743c2c15427633c731532d8349b to your computer and use it in GitHub Desktop.
Example for using `ciaranmcnulty/behat-psr7extension` with a Zend Expressive app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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