mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 15:33:15 +00:00
PHRAS-2605_fix-unittest-bootstrap_4.1
fix conf
This commit is contained in:
@@ -256,6 +256,7 @@ class Application extends SilexApplication
|
|||||||
$this->register(new OrderServiceProvider());
|
$this->register(new OrderServiceProvider());
|
||||||
$this->register(new WebhookServiceProvider());
|
$this->register(new WebhookServiceProvider());
|
||||||
|
|
||||||
|
|
||||||
$this['monolog'] = $this->share(
|
$this['monolog'] = $this->share(
|
||||||
$this->extend('monolog', function (LoggerInterface $logger, Application $app) {
|
$this->extend('monolog', function (LoggerInterface $logger, Application $app) {
|
||||||
|
|
||||||
@@ -273,6 +274,7 @@ class Application extends SilexApplication
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
$this['phraseanet.exception_handler'] = $this->share(function ($app) {
|
$this['phraseanet.exception_handler'] = $this->share(function ($app) {
|
||||||
/** @var PhraseaExceptionHandler $handler */
|
/** @var PhraseaExceptionHandler $handler */
|
||||||
$handler = PhraseaExceptionHandler::register($app['debug']);
|
$handler = PhraseaExceptionHandler::register($app['debug']);
|
||||||
|
@@ -38,7 +38,7 @@ class LazaretController extends Controller
|
|||||||
*
|
*
|
||||||
* @param Request $request The current request
|
* @param Request $request The current request
|
||||||
*
|
*
|
||||||
* @return Response
|
* @return String
|
||||||
*/
|
*/
|
||||||
public function listElement(Request $request)
|
public function listElement(Request $request)
|
||||||
{
|
{
|
||||||
|
@@ -43,7 +43,8 @@ class LocaleServiceProvider implements ServiceProviderInterface
|
|||||||
|
|
||||||
if (0 === count($enabledLanguages)) {
|
if (0 === count($enabledLanguages)) {
|
||||||
$app['monolog']->error('Wrong language configuration, no language activated');
|
$app['monolog']->error('Wrong language configuration, no language activated');
|
||||||
|
$app['monolog']->error(var_export(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS), true));
|
||||||
|
// throw new \Exception('Wrong language configuration, no language activated');
|
||||||
return $availableLanguages;
|
return $availableLanguages;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -25,7 +25,7 @@ class Notifier implements NotifierInterface
|
|||||||
private $logger;
|
private $logger;
|
||||||
|
|
||||||
/** @var integer */
|
/** @var integer */
|
||||||
private $timeout = 1;
|
private $timeout = 10;
|
||||||
|
|
||||||
public function __construct(\ZMQSocket $socket, LoggerInterface $logger)
|
public function __construct(\ZMQSocket $socket, LoggerInterface $logger)
|
||||||
{
|
{
|
||||||
|
@@ -152,6 +152,7 @@ class ApplicationTest extends \PhraseanetTestCase
|
|||||||
$sessionId = null;
|
$sessionId = null;
|
||||||
$app->post('/prod/upload/', function (Application $app) use (&$sessionId) {
|
$app->post('/prod/upload/', function (Application $app) use (&$sessionId) {
|
||||||
$sessionId = $app['session']->getId();
|
$sessionId = $app['session']->getId();
|
||||||
|
return "";
|
||||||
});
|
});
|
||||||
|
|
||||||
$client = new Client($app);
|
$client = new Client($app);
|
||||||
|
@@ -106,6 +106,7 @@ class UploadTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
|
|
||||||
$record = new \record_adapter(self::$DI['app'], $id[0], $id[1]);
|
$record = new \record_adapter(self::$DI['app'], $id[0], $id[1]);
|
||||||
$this->assertTrue($record->get_thumbnail()->is_physically_present());
|
$this->assertTrue($record->get_thumbnail()->is_physically_present());
|
||||||
|
$zzz = $record->get_caption()->get_fields();
|
||||||
$fields = $record->get_caption()->get_fields(['FileName']);
|
$fields = $record->get_caption()->get_fields(['FileName']);
|
||||||
$field = array_pop($fields);
|
$field = array_pop($fields);
|
||||||
$this->assertEquals('KIKOO.JPG', $field->get_serialized_values());
|
$this->assertEquals('KIKOO.JPG', $field->get_serialized_values());
|
||||||
|
@@ -6,6 +6,7 @@ main:
|
|||||||
maintenance: false
|
maintenance: false
|
||||||
key: ''
|
key: ''
|
||||||
api_require_ssl: true
|
api_require_ssl: true
|
||||||
|
delete-account-require-email-confirmation: true
|
||||||
database:
|
database:
|
||||||
host: 'sql-host'
|
host: 'sql-host'
|
||||||
port: 3306
|
port: 3306
|
||||||
@@ -212,3 +213,35 @@ embed_bundle:
|
|||||||
document:
|
document:
|
||||||
player: flexpaper
|
player: flexpaper
|
||||||
enable-pdfjs: true
|
enable-pdfjs: true
|
||||||
|
geocoding-providers:
|
||||||
|
-
|
||||||
|
name: 'mapBox'
|
||||||
|
enabled: true
|
||||||
|
public-key: ''
|
||||||
|
default-position:
|
||||||
|
- 2.335062
|
||||||
|
- 48.879162
|
||||||
|
default-zoom: 2
|
||||||
|
marker-default-zoom: 11
|
||||||
|
position-fields:
|
||||||
|
-
|
||||||
|
name: GpsCompositePosition
|
||||||
|
type: latlng
|
||||||
|
# -
|
||||||
|
# name: Longitude
|
||||||
|
# type: lng
|
||||||
|
# -
|
||||||
|
# name: Latitude
|
||||||
|
# type: lat
|
||||||
|
video-editor:
|
||||||
|
vttFieldName: VideoTextTrackChapters
|
||||||
|
seekBackwardStep: 1000 # in ms
|
||||||
|
seekForwardStep: 1000 # in ms
|
||||||
|
playbackRates:
|
||||||
|
- 1
|
||||||
|
- '1.5'
|
||||||
|
- 3
|
||||||
|
|
||||||
|
user_account:
|
||||||
|
deleting_policies:
|
||||||
|
email_confirmation: true
|
||||||
|
@@ -6,6 +6,7 @@ main:
|
|||||||
maintenance: false
|
maintenance: false
|
||||||
key: ''
|
key: ''
|
||||||
api_require_ssl: true
|
api_require_ssl: true
|
||||||
|
delete-account-require-email-confirmation: true
|
||||||
database:
|
database:
|
||||||
host: 'sql-host'
|
host: 'sql-host'
|
||||||
port: 3306
|
port: 3306
|
||||||
@@ -212,3 +213,35 @@ embed_bundle:
|
|||||||
document:
|
document:
|
||||||
player: flexpaper
|
player: flexpaper
|
||||||
enable-pdfjs: true
|
enable-pdfjs: true
|
||||||
|
geocoding-providers:
|
||||||
|
-
|
||||||
|
name: 'mapBox'
|
||||||
|
enabled: true
|
||||||
|
public-key: ''
|
||||||
|
default-position:
|
||||||
|
- 2.335062
|
||||||
|
- 48.879162
|
||||||
|
default-zoom: 2
|
||||||
|
marker-default-zoom: 11
|
||||||
|
position-fields:
|
||||||
|
-
|
||||||
|
name: GpsCompositePosition
|
||||||
|
type: latlng
|
||||||
|
# -
|
||||||
|
# name: Longitude
|
||||||
|
# type: lng
|
||||||
|
# -
|
||||||
|
# name: Latitude
|
||||||
|
# type: lat
|
||||||
|
video-editor:
|
||||||
|
vttFieldName: VideoTextTrackChapters
|
||||||
|
seekBackwardStep: 1000 # in ms
|
||||||
|
seekForwardStep: 1000 # in ms
|
||||||
|
playbackRates:
|
||||||
|
- 1
|
||||||
|
- '1.5'
|
||||||
|
- 3
|
||||||
|
|
||||||
|
user_account:
|
||||||
|
deleting_policies:
|
||||||
|
email_confirmation: true
|
||||||
|
@@ -273,6 +273,7 @@ abstract class PhraseanetTestCase extends WebTestCase
|
|||||||
static $decodedFixtureIds;
|
static $decodedFixtureIds;
|
||||||
|
|
||||||
if (is_null($decodedFixtureIds)) {
|
if (is_null($decodedFixtureIds)) {
|
||||||
|
$p = sys_get_temp_dir().'/fixtures.json';
|
||||||
$decodedFixtureIds = json_decode(file_get_contents(sys_get_temp_dir().'/fixtures.json'), true);
|
$decodedFixtureIds = json_decode(file_get_contents(sys_get_temp_dir().'/fixtures.json'), true);
|
||||||
}
|
}
|
||||||
self::$fixtureIds = $decodedFixtureIds;
|
self::$fixtureIds = $decodedFixtureIds;
|
||||||
@@ -379,6 +380,8 @@ abstract class PhraseanetTestCase extends WebTestCase
|
|||||||
|
|
||||||
$app->boot();
|
$app->boot();
|
||||||
|
|
||||||
|
// $app['monolog'] = $this->getMock('Psr\Log\LoggerInterface');
|
||||||
|
|
||||||
return $app;
|
return $app;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
Reference in New Issue
Block a user