Files
Phraseanet/lib/unitTest/Alchemy/Phrasea/Controller/Setup/FakeUpgradeApplication.inc
Romain Neutron 5d1377f446 Setup unit tests
2012-01-26 17:42:08 +01:00

31 lines
810 B
PHP

<?php
namespace Alchemy\Phrasea\Application;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;
use Alchemy\Phrasea\Controller\Setup as Controller;
use Alchemy\Phrasea\Controller\Utils as ControllerUtils;
require_once __DIR__ . '/../../../../../bootstrap.php';
return call_user_func(function()
{
$app = new \Silex\Application();
$app['Core'] = \bootstrap::getCore();
$app['upgrade'] = true;
$app->get('/', function() use ($app)
{
return $app->redirect('/setup/upgrader/');
});
$app->mount('/upgrader/', new Controller\Upgrader());
$app->mount('/test', new ControllerUtils\PathFileTest());
$app->mount('/connection_test', new ControllerUtils\ConnectionTest());
return $app;
});