5 $app = new \Silex\Application();
6 $app->register(new \Silex\Provider\SessionServiceProvider());
8 $def = realpath(__DIR__.'/../vendor/behat/mink/driver-testsuite/web-fixtures');
9 require_once $def . '/utils.php';
11 $ovr = realpath(__DIR__.'/web-fixtures');
12 $cbk = function ($file) use ($app, $def, $ovr) {
13 $file = str_replace('.file', '.php', $file);
14 $path = file_exists($ovr.'/'.$file) ? $ovr.'/'.$file : $def.'/'.$file;
19 $content = ob_get_clean();
22 if ('' === $resp->getContent()) {
23 $resp->setContent($content);
32 $app->get('/{file}', $cbk)->assert('file', '.*');
33 $app->post('/{file}', $cbk)->assert('file', '.*');
36 $app['exception_handler']->disable();
37 $app['session.test'] = true;