Skip to content

Commit

Permalink
Merge pull request #2044 from soyuka/web-server-bundle
Browse files Browse the repository at this point in the history
Add web server bundle for debug purpose
  • Loading branch information
soyuka committed Jun 28, 2018
2 parents 55cad47 + 41abcff commit 7c38133
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/Fixtures/app/public/index.php
@@ -0,0 +1,22 @@
<?php

/*
* This file is part of the API Platform project.
*
* (c) Kévin Dunglas <dunglas@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

declare(strict_types=1);

use Symfony\Component\HttpFoundation\Request;

require __DIR__.'/../bootstrap.php';
$env = $_SERVER['APP_ENV'] ?? 'test';
$kernel = new AppKernel($env, $_SERVER['APP_DEBUG'] ?? ('prod' !== $env));
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);

0 comments on commit 7c38133

Please sign in to comment.