Skip to content

Instantly share code, notes, and snippets.

Created December 17, 2012 18:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save anonymous/4320524 to your computer and use it in GitHub Desktop.
Save anonymous/4320524 to your computer and use it in GitHub Desktop.
<?php
use Silex\WebTestCase;
use Silex\Application;
use Silex\Provider\SessionServiceProvider;
class unitTest extends WebTestCase
{
public function testUn()
{
$client = $this->createClient();
$client->request('GET', '/');
$client->request('GET', '/');
}
public function createApplication()
{
$app = new Application('test');
$app->register(new SessionServiceProvider(), array(
'session.test' => true
));
$app['debug'] = true;
$app['exception_handler']->disable();
$app->get('/', function(Application $app) {
$app['session']->save('pif', 'paf');
return 'BOOM';
});
return $app;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment