Last active
August 29, 2015 14:16
-
-
Save hugoboos/d471df324ff678c11f0a to your computer and use it in GitHub Desktop.
Segmentation fault with Xdebug
This file contains hidden or 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 | |
# 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