Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.