Skip to content

Instantly share code, notes, and snippets.

@hugoboos
Last active August 29, 2015 14:16
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 hugoboos/d471df324ff678c11f0a to your computer and use it in GitHub Desktop.
Save hugoboos/d471df324ff678c11f0a to your computer and use it in GitHub Desktop.
Segmentation fault with Xdebug
<?php
# src/app.php
require_once __DIR__ . "/../vendor/autoload.php";
$app = new Silex\Application();
$app->register(new \Silex\Provider\MonologServiceProvider());
$app['monolog'] = $app->share($app->extend("monolog", function($monolog, $app) {
// Code
}));
$app->error(function (\Exception $exception) use ($app) {
// Code
});
return $app;
# tests/Test.php
class Test extends \Silex\WebTestCase
{
public function createApplication()
{
return require __DIR__ . "/../src/app.php";
}
public function testHealthPage()
{
$client = $this->createClient();
$client->request("GET", "/");
}
}
# composer.json
{
"require": {
"silex/silex": "~1.2",
"monolog/monolog": "~1.12.0",
"symfony/browser-kit": "~2.6.4",
"phpunit/phpunit": "~4.4.5"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment