mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 15:33:15 +00:00
Fix tests
This commit is contained in:
@@ -23,7 +23,7 @@ use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Application;
|
||||
|
||||
require_once dirname(__FILE__) . '/../lib/classes/bootstrap.class.php';
|
||||
$Core = require_once dirname(__FILE__) . '/../lib/bootstrap.php';
|
||||
|
||||
$result_code = 1;
|
||||
|
||||
|
15
bin/doctrine
15
bin/doctrine
@@ -24,7 +24,7 @@ use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Application;
|
||||
use Alchemy\Phrasea;
|
||||
|
||||
require_once dirname(__FILE__) . '/../lib/classes/bootstrap.class.php';
|
||||
$Core = require_once dirname(__FILE__) . '/../lib/bootstrap.php';
|
||||
bootstrap::register_autoloads();
|
||||
|
||||
try
|
||||
@@ -38,22 +38,21 @@ try
|
||||
$serviceName = $configuration->getOrm();
|
||||
$confService = $configuration->getService($serviceName);
|
||||
|
||||
if($confService->get("type") !== 'doctrine')
|
||||
if ($confService->get("type") !== 'Orm\\Doctrine')
|
||||
{
|
||||
exit(sprintf("Doctrine is not declared as your ORM but %s is", $confService->get("type")));
|
||||
}
|
||||
|
||||
$ormServiceBuilder = new \Alchemy\Phrasea\Core\ServiceBuilder\Orm(
|
||||
$serviceName
|
||||
$ormService = \Alchemy\Phrasea\Core\Service\Builder::create(
|
||||
$Core
|
||||
, $serviceName
|
||||
, $confService
|
||||
, array('registry' => \registry::get_instance())
|
||||
);
|
||||
|
||||
$ormService = $ormServiceBuilder->buildService();
|
||||
$em = $ormService->getService();
|
||||
$em = $ormService->getDriver();
|
||||
/* @var $em \Doctrine\ORM\EntityManager */
|
||||
|
||||
$app = new Application("Phraseanet Doctrine Console", $ormService->getVersion());
|
||||
$app = new Application("Phraseanet Doctrine Console");
|
||||
|
||||
$helpers = array(
|
||||
'db' => new \Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper($em->getConnection()),
|
||||
|
@@ -453,7 +453,7 @@ class module_console_fileEnsureProductionSetting extends Command
|
||||
}
|
||||
$registry = \registry::get_instance();
|
||||
|
||||
$service = new Core\Service\Builder(
|
||||
$service = Core\Service\Builder::create(
|
||||
\bootstrap::getCore()
|
||||
, $ormName
|
||||
, $configuration
|
||||
|
@@ -823,13 +823,13 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase
|
||||
$serviceName = $configuration->getTemplating();
|
||||
$confService = $configuration->getService($serviceName);
|
||||
|
||||
$templateServiceBuilder = \Alchemy\Phrasea\Core\Service\Builder::create(
|
||||
$templateService = \Alchemy\Phrasea\Core\Service\Builder::create(
|
||||
self::$core,
|
||||
$serviceName
|
||||
, $confService
|
||||
);
|
||||
|
||||
$this->app['Core']["Twig"] = $templateServiceBuilder->getDriver();
|
||||
$this->app['Core']["Twig"] = $templateService->getDriver();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user