Last active
August 29, 2015 14:16
-
-
Save hugoboos/d471df324ff678c11f0a to your computer and use it in GitHub Desktop.
Revisions
-
Hugo renamed this gist
Mar 3, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Hugo created this gist
Mar 3, 2015 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,44 @@ <?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" } }