public function createApplication()
{
$app = Application::getInstance();
$app['debug'] = true;
// ログの内容をERRORレベルでしか出力しないように設定を上書き
$app['config'] = $app->share($app->extend('config', function ($config, \Silex\Application $app) {
$config['log']['log_level'] = 'ERROR';
$config['log']['action_level'] = 'ERROR';
$config['log']['passthru_level'] = 'ERROR';
$channel = $config['log']['channel'];
foreach (array('monolog', 'front', 'admin') as $key) {
$channel[$key]['log_level'] = 'ERROR';
$channel[$key]['action_level'] = 'ERROR';
$channel[$key]['passthru_level'] = 'ERROR';
}
$config['log']['channel'] = $channel;
return $config;
}));
$app->initLogger();
$app->initialize();
$app->initializePlugin();
$app['session.test'] = true;
$app['exception_handler']->disable();
$app['form.csrf_provider'] = $app->share(function () {
return new CsrfTokenMock();
});
$app->register(new \Eccube\Tests\ServiceProvider\FixtureServiceProvider());
$app->boot();
return $app;
}