Commit abcb36af authored by Maxime Reyrolle's avatar Maxime Reyrolle
Browse files

Merge branch '1246-journaliser-connecteurs-et-types-de-dossiers-studio' into 'master'

Resolve "Journaliser les types de dossiers studio"

Closes #1246

See merge request libriciel/pole-plate-formes/pastell/pastell!741
parents 020c834d c9c7f742
# [3.1.6]
***Cette version nécessite une modification de la base de données***
***Cette version nécessite la version 0.6.0 du générateur SEDA***
## Évolutions
......@@ -23,6 +24,7 @@
- Ajout d'un connecteur global generateur SEDA afin de ne positionner l'URL de l'outil qu'une seule fois #1320
- Ajout du `ServiceLevel` (Niveau de service demandé) dans les bordereaux de transfert du générateur SEDA #1344
- Colonne qui récapitule le nombre de mails sécurisés envoyés, lus et répondus sur la liste des flux "Mail sécurisés" et "Mail sécurisés avec réponse" #1345
- Ajout des états pour type de dossier #1246
# [3.1.5] - 2021-08-04
......
......@@ -6,6 +6,7 @@ use Pastell\Service\TypeDossier\TypeDossierExportService;
use Pastell\Service\TypeDossier\TypeDossierImportService;
use Pastell\Service\TypeDossier\TypeDossierUtilService;
use Pastell\Service\TypeDossier\TypeDossierManager;
use Pastell\Service\TypeDossier\TypeDossierActionService;
class TypeDossierControler extends PastellControler
{
......@@ -72,6 +73,14 @@ class TypeDossierControler extends PastellControler
return $this->getObjectInstancier()->getInstance(TypeDossierEtapeManager::class);
}
/**
* @return TypeDossierActionService
*/
private function getTypeDossierActionService(): TypeDossierActionService
{
return $this->getObjectInstancier()->getInstance(TypeDossierActionService::class);
}
/**
* @throws NotFoundException
*/
......@@ -150,10 +159,13 @@ class TypeDossierControler extends PastellControler
if ($is_new) {
$typeDossierEditionService->editLibelleInfo($id_t, $target_type_dossier_id, TypeDossierUtilService::TYPE_DOSSIER_CLASSEMENT_DEFAULT, "", "onglet1");
$this->setLastMessage("Le type de dossier personnalisé $target_type_dossier_id a été créé");
$message = "Le type de dossier personnalisé $target_type_dossier_id a été créé";
$this->getTypeDossierActionService()->add($this->getId_u(), $id_t, TypeDossierActionService::ACTION_AJOUTE, $message);
} else {
$this->setLastMessage("Modification de l'identifiant du type de dossier personnalisé $target_type_dossier_id");
$message = "Modification de l'identifiant du type de dossier personnalisé $target_type_dossier_id";
$this->getTypeDossierActionService()->add($this->getId_u(), $id_t, TypeDossierActionService::ACTION_MODIFFIE, $message);
}
$this->setLastMessage($message);
$this->redirect("/TypeDossier/detail?id_t=$id_t");
}
......@@ -209,11 +221,32 @@ class TypeDossierControler extends PastellControler
public function detailAction()
{
$this->commonEdition();
$this->{'offset'} = $this->getPostOrGetInfo()->get('offset', 0);
$this->{'limit'} = 20;
$this->{'count'} = $this->getTypeDossierActionService()->countById($this->{'id_t'});
$this->{'csrfToken'} = $this->getObjectInstancier()->getInstance(CSRFToken::class);
$this->{'template_milieu'} = "TypeDossierDetail";
$this->renderDefault();
}
/**
* @throws NotFoundException
*/
public function etatAction()
{
$this->verifDroit(0, "system:edition");
$this->{'id_t'} = $this->getPostOrGetInfo()->getInt('id_t');
$this->{'page_title'} = "États du type de dossier personnalisé {$this->getTypeDossierSQL()->getInfo($this->{'id_t'})['id_type_dossier']}";
$this->{'offset'} = $this->getPostOrGetInfo()->get('offset', 0);
$this->{'limit'} = 10;
$this->{'count'} = $this->getTypeDossierActionService()->countById($this->{'id_t'});
$this->{'typeDossierAction'} = $this->getTypeDossierActionService()->getById($this->{'id_t'}, $this->{'offset'}, $this->{'limit'});
$this->{'template_milieu'} = "TypeDossierEtat";
$this->renderDefault();
}
/**
* @throws NotFoundException
*/
......@@ -241,7 +274,9 @@ class TypeDossierControler extends PastellControler
$this->setLastError($e->getMessage());
$this->redirect("/TypeDossier/editionLibelle?id_t={$this->{'id_t'}}");
}
$this->setLastMessage("Les modifications ont été enregistrées");
$message = "La modification des informations sur le type de dossier a été enregistrée";
$this->getTypeDossierActionService()->add($this->getId_u(), $this->{'id_t'}, TypeDossierActionService::ACTION_MODIFFIE, $message);
$this->setLastMessage($message);
$this->redirect("/TypeDossier/detail?id_t={$this->{'id_t'}}");
}
......@@ -271,7 +306,9 @@ class TypeDossierControler extends PastellControler
$this->setLastError($e->getMessage());
$this->redirect("/TypeDossier/detail?id_t={$this->{'id_t'}}");
}
$this->setLastMessage("Les modifications ont été enregistrées");
$message = "La modification d'éléments du formulaire a été enregistrée";
$this->getTypeDossierActionService()->add($this->getId_u(), $this->{'id_t'}, TypeDossierActionService::ACTION_MODIFFIE, $message);
$this->setLastMessage($message);
$this->redirect("/TypeDossier/detail?id_t={$this->{'id_t'}}");
}
......@@ -292,7 +329,9 @@ class TypeDossierControler extends PastellControler
$this->setLastMessage($e->getMessage());
$this->redirect("/TypeDossier/detail?id_t={$this->{'id_t'}}");
}
$this->setLastMessage("L'élément a été supprimé");
$message = "La modification d'éléments du formulaire a été enregistrée";
$this->getTypeDossierActionService()->add($this->getId_u(), $this->{'id_t'}, TypeDossierActionService::ACTION_MODIFFIE, $message);
$this->setLastMessage($message);
$this->redirect("/TypeDossier/detail?id_t={$this->{'id_t'}}");
}
......@@ -330,7 +369,9 @@ class TypeDossierControler extends PastellControler
$this->setLastMessage($e->getMessage());
$this->redirect("/TypeDossier/detail?id_t={$this->{'id_t'}}");
}
$this->setLastMessage("Les modifications ont été enregistrées");
$message = "La modification des étapes du cheminement a été enregistrée";
$this->getTypeDossierActionService()->add($this->getId_u(), $this->{'id_t'}, TypeDossierActionService::ACTION_MODIFFIE, $message);
$this->setLastMessage($message);
$this->redirect("/TypeDossier/detail?id_t={$this->{'id_t'}}");
}
......@@ -350,7 +391,9 @@ class TypeDossierControler extends PastellControler
$this->setLastMessage($e->getMessage());
$this->redirect("/TypeDossier/detail?id_t={$this->{'id_t'}}");
}
$this->setLastMessage("L'étape a été supprimée");
$message = "La modification des étapes du cheminement a été enregistrée";
$this->getTypeDossierActionService()->add($this->getId_u(), $this->{'id_t'}, TypeDossierActionService::ACTION_MODIFFIE, $message);
$this->setLastMessage($message);
$this->redirect("/TypeDossier/detail?id_t={$this->{'id_t'}}");
}
......@@ -362,6 +405,8 @@ class TypeDossierControler extends PastellControler
$this->commonEdition();
$tr = $this->getPostInfo()->get("tr");
$this->getTypeDossierService()->sortElement($this->{'id_t'}, $tr);
$message = "L'ordre des éléments du formulaire a été modifié";
$this->getTypeDossierActionService()->add($this->getId_u(), $this->{'id_t'}, TypeDossierActionService::ACTION_MODIFFIE, $message);
print_r($tr);
echo "OK";
}
......@@ -376,6 +421,9 @@ class TypeDossierControler extends PastellControler
$this->verifyNoDocumentIsUsingTypeDossier($id_type_dossier);
$tr = $this->getPostInfo()->get("tr");
$this->getTypeDossierService()->sortEtape($this->{'id_t'}, $tr);
$message = "L'ordre des étapes du cheminement a été modifié";
$this->getTypeDossierActionService()->add($this->getId_u(), $this->{'id_t'}, TypeDossierActionService::ACTION_MODIFFIE, $message);
print_r($tr);
echo "OK";
}
......@@ -409,10 +457,13 @@ class TypeDossierControler extends PastellControler
}
$etapeInfo = $this->getTypeDossierService()->getEtapeInfo($this->{'id_t'}, $num_etape);
$message = "La modification des étapes du cheminement a été enregistrée";
if ($etapeInfo->specific_type_info) {
$this->getTypeDossierActionService()->add($this->getId_u(), $this->{'id_t'}, TypeDossierActionService::ACTION_MODIFFIE, $message);
$this->setLastMessage("L'étape a été créée. Veuillez saisir les propriétés spécifiques de l'étape.");
$this->redirect("/TypeDossier/editionEtape?id_t={$this->{'id_t'}}&num_etape=$num_etape");
}
$this->getTypeDossierActionService()->add($this->getId_u(), $this->{'id_t'}, TypeDossierActionService::ACTION_MODIFFIE, $message);
$this->setLastMessage("L'étape a été créée.");
$this->redirect("/TypeDossier/detail?id_t={$this->{'id_t'}}");
}
......@@ -460,12 +511,12 @@ class TypeDossierControler extends PastellControler
}
if ($result[TypeDossierUtilService::ID_TYPE_DOSSIER] == $result[TypeDossierUtilService::ORIG_ID_TYPE_DOSSIER]) {
$this->setLastMessage("Le type de dossier <b>{$result['id_type_dossier']}</b> a été importé.");
$message = "Le type de dossier <b>{$result['id_type_dossier']}</b> a été importé.";
} else {
$this->setLastMessage(
"Le type de dossier a été importé avec l'identifiant <b>{$result[TypeDossierUtilService::ID_TYPE_DOSSIER]}</b> car l'identiant original ({$result[TypeDossierUtilService::ORIG_ID_TYPE_DOSSIER]}) existe déjà sur la plateforme"
);
$message = "Le type de dossier a été importé avec l'identifiant <b>{$result[TypeDossierUtilService::ID_TYPE_DOSSIER]}</b> car l'identiant original ({$result[TypeDossierUtilService::ORIG_ID_TYPE_DOSSIER]}) existe déjà sur la plateforme";
}
$this->getTypeDossierActionService()->add($this->getId_u(), $result[TypeDossierUtilService::ID_T], TypeDossierActionService::ACTION_AJOUTE, $message);
$this->setLastMessage($message);
$this->redirect("/TypeDossier/detail?id_t={$result['id_t']}");
}
......
This diff is collapsed.
......@@ -303,6 +303,18 @@ CREATE TABLE `type_dossier` (
`definition` json NOT NULL,
PRIMARY KEY (`id_t`)
) ENGINE=MyISAM ;
CREATE TABLE `type_dossier_action` (
`id_a` int(11) NOT NULL AUTO_INCREMENT,
`id_u` int(11) NOT NULL,
`id_t` int(11) NOT NULL,
`action` varchar(64) NOT NULL,
`date` datetime NOT NULL,
`empreinte_sha256` varchar(128) NOT NULL,
`message` mediumtext NOT NULL,
`export_json` json NOT NULL,
PRIMARY KEY (`id_a`),
KEY `id_t` (`id_t`)
) ENGINE=MyISAM ;
CREATE TABLE `utilisateur` (
`id_u` int(11) NOT NULL AUTO_INCREMENT,
`email` varchar(128) NOT NULL,
......
<?php
class TypeDossierActionSQL extends SQL
{
public const DEFAULT_LIMIT = 20;
public function add(int $id_u, int $id_t, string $action, string $empreinte_sha256, string $message, string $export_json): int
{
$now = date(Date::DATE_ISO);
$sql = "INSERT INTO type_dossier_action(id_u, id_t, action, date, empreinte_sha256, message, export_json) VALUES (?,?,?,?,?,?,?)";
$this->query($sql, $id_u, $id_t, $action, $now, $empreinte_sha256, $message, $export_json);
return $this->lastInsertId();
}
public function getById(int $id_t, int $offset = 0, int $limit = self::DEFAULT_LIMIT): array
{
$sql = "SELECT type_dossier_action.id_u AS id_u, " .
" type_dossier_action.action AS action, " .
" type_dossier_action.date AS date, " .
" type_dossier_action.empreinte_sha256 AS empreinte_sha256, " .
" type_dossier_action.message AS message, " .
" type_dossier_action.export_json AS export_json, " .
" utilisateur.nom AS nom, " .
" utilisateur.prenom AS prenom" .
" FROM type_dossier_action " .
" LEFT JOIN utilisateur ON type_dossier_action.id_u = utilisateur.id_u " .
" WHERE id_t= ? " .
" ORDER BY date DESC,id_a DESC";
$sql .= " LIMIT $offset,$limit";
return $this->query($sql, $id_t);
}
public function countById(int $id_t): int
{
$sql = "SELECT count(*) " .
" FROM type_dossier_action " .
" WHERE id_t= ? ";
return $this->queryOne($sql, $id_t);
}
}
......@@ -31,7 +31,6 @@ class TypeDossierSQL extends SQL
return json_decode($this->queryOne($sql, $id_t), true);
}
public function getAll()
{
$sql = "SELECT * FROM type_dossier ORDER BY id_type_dossier";
......@@ -48,6 +47,9 @@ class TypeDossierSQL extends SQL
{
$sql = "DELETE FROM type_dossier WHERE id_t=?";
$this->query($sql, $id_t);
$sql = "DELETE FROM type_dossier_action WHERE id_t=?";
$this->query($sql, $id_t);
}
public function getByIdTypeDossier($id_type_dossier)
......
<?php
namespace Pastell\Service\TypeDossier;
use TypeDossierActionSQL;
use Pastell\Service\TypeDossier\TypeDossierManager;
use Pastell\Service\TypeDossier\TypeDossierExportService;
class TypeDossierActionService
{
public const ACTION_MODIFFIE = 'Modifié';
public const ACTION_AJOUTE = 'Ajouté';
private $id_u;
/**
* @var TypeDossierActionSQL
*/
private $typeDossierActionSQL;
/**
* @var TypeDossierManager
*/
private $typeDossierManager;
/**
* @var TypeDossierExportService
*/
private $typeDossierExportService;
public function __construct(
TypeDossierActionSQL $typeDossierActionSQL,
TypeDossierExportService $typeDossierExportService,
TypeDossierManager $typeDossierManager
) {
$this->typeDossierActionSQL = $typeDossierActionSQL;
$this->typeDossierExportService = $typeDossierExportService;
$this->typeDossierManager = $typeDossierManager;
}
public function add(int $id_u, int $id_t, string $action, string $message): int
{
return $this->typeDossierActionSQL->add(
$id_u,
$id_t,
$action,
$this->typeDossierManager->getHash($id_t),
$message,
$this->typeDossierExportService->export($id_t)
);
}
public function getById(int $id_t, int $offset = 0, int $limit = TypeDossierActionSQL::DEFAULT_LIMIT): array
{
return $this->typeDossierActionSQL->getById($id_t, $offset, $limit);
}
public function countById(int $id_t): int
{
return $this->typeDossierActionSQL->countById($id_t);
}
}
......@@ -10,8 +10,6 @@ use TypeDossierSQL;
use TypeDossierPersonnaliseDirectoryManager;
use TypeDossierProperties;
use FluxDefinitionFiles;
use EntiteSQL;
use Journal;
class TypeDossierEditionService
{
......@@ -39,35 +37,21 @@ class TypeDossierEditionService
*/
private $typeDossierEtapeManager;
/**
* @var TypeDossierExportService
*/
private $typeDossierExportService;
/**
* @var TypeDossierManager
*/
private $typeDossierManager;
/**
* @var Journal
*/
private $journal;
public function __construct(
TypeDossierSQL $typeDossierSQL,
TypeDossierPersonnaliseDirectoryManager $typeDossierPersonnaliseDirectoryManager,
TypeDossierEtapeManager $typeDossierEtapeManager,
TypeDossierExportService $typeDossierExportService,
Journal $journal,
TypeDossierManager $typeDossierManager,
FluxDefinitionFiles $fluxDefinitionFiles
) {
$this->typeDossierSQL = $typeDossierSQL;
$this->typeDossierPersonnaliseDirectoryManager = $typeDossierPersonnaliseDirectoryManager;
$this->typeDossierEtapeManager = $typeDossierEtapeManager;
$this->typeDossierExportService = $typeDossierExportService;
$this->journal = $journal;
$this->typeDossierManager = $typeDossierManager;
$this->fluxDefinitionFiles = $fluxDefinitionFiles;
}
......@@ -93,26 +77,10 @@ class TypeDossierEditionService
*/
public function edit(int $id_t, TypeDossierProperties $typeDossierProperties): int
{
if (! $id_t) {
$journal_action = Journal::ACTION_AJOUTE;
$message_action = 'Ajout';
} else {
$journal_action = Journal::ACTION_MODIFFIE;
$message_action = 'Modification';
}
$typeDossierProperties = $this->fixSameStepsType($typeDossierProperties);
$id_t = $this->typeDossierSQL->edit($id_t, $typeDossierProperties);
$this->typeDossierPersonnaliseDirectoryManager->save($id_t, $typeDossierProperties);
$export = $this->typeDossierExportService->export($id_t);
$this->journal->add(
Journal::TYPE_DOSSIER_EDITION,
EntiteSQL::ID_E_ENTITE_RACINE,
Journal::NO_ID_D,
$journal_action,
$message_action . " du type de dossier id_t=$id_t. JSON contenant l'export de la definition du type de dossier : " . $export
);
return $id_t;
}
......
......@@ -2,7 +2,6 @@
namespace Pastell\Service\TypeDossier;
use TypeDossierEtapeManager;
use TypeDossierSQL;
use TypeDossierException;
use Exception;
......@@ -24,22 +23,14 @@ class TypeDossierImportService
*/
private $typeDossierEditionService;
/**
* @var TypeDossierEtapeManager
*/
private $typeDossierEtapeManager;
public function __construct(
TypeDossierManager $typeDossierManager,
TypeDossierEditionService $typeDossierEditionService,
TypeDossierSQL $typeDossierSQL,
TypeDossierEtapeManager $typeDossierEtapeManager
TypeDossierSQL $typeDossierSQL
) {
$this->typeDossierManager = $typeDossierManager;
$this->typeDossierEditionService = $typeDossierEditionService;
$this->typeDossierSQL = $typeDossierSQL;
$this->typeDossierEtapeManager = $typeDossierEtapeManager;
}
/**
......
......@@ -153,6 +153,11 @@
</div>
<div class="row">
<div class="col float-right">
<a class='btn btn-link' href='TypeDossier/etat?id_t=<?php echo $id_t ?>'><i class='fa fa-list-alt'></i>&nbsp;Voir les états du type de dossier</a>
</div>
</div>
<script>
$(document).ready(function(){
......
<?php
/**
* @var int $id_t
* @var array $typeDossierAction
* @var int $offset
* @var int $limit
* @var int $count
*/
?>
<a class='btn btn-link' href='TypeDossier/detail?id_t=<?php echo $id_t?>'>
<i class="fa fa-arrow-left"></i>&nbsp;Détail du type de dossier
</a>
<?php $this->SuivantPrecedent($offset, $limit, $count, "TypeDossier/etat?id_t=$id_t"); ?>
<div class="box" >
<table class="table table-striped">
<tr>
<th>État</th>
<th>Date</th>
<th>Utilisateur</th>
<th>Empreinte sha256</th>
<th>Message</th>
<th>Export Json</th>
</tr>
<?php foreach ($typeDossierAction as $action) : ?>
<tr>
<td><?php echo $action['action'] ?></td>
<td><?php echo time_iso_to_fr($action['date'])?></td>
<td>
<?php if ($action['id_u'] == 0) : ?>
Action automatique
<?php else : ?>
<a href='Utilisateur/detail?id_u=<?php echo $action['id_u']?>'><?php hecho($action['prenom']); ?> <?php hecho($action['nom']); ?></a>
<?php endif;?>
</td>
<td><?php echo $action['empreinte_sha256'] ?></td>
<td><?php echo $action['message'] ?></td>
<td><?php echo $action['export_json'] ?></td>
</tr>
<?php endforeach;?>
</table>
</div>
<?php $this->SuivantPrecedent($offset, $limit, $count, "TypeDossier/etat?id_t=$id_t"); ?>
<?php
use Pastell\Service\TypeDossier\TypeDossierActionService;
use Pastell\Service\TypeDossier\TypeDossierEditionService;
use Pastell\Service\TypeDossier\TypeDossierExportService;
......@@ -114,6 +115,10 @@ class TypeDossierControlerTest extends ControlerTestCase
$typeDossierSQL = $this->getObjectInstancier()->getInstance(TypeDossierSQL::class);
$id_t = $typeDossierSQL->getByIdTypeDossier($id_type_dossier);
$this->assertEquals($id_type_dossier, $typeDossierSQL->getInfo($id_t)['id_type_dossier']);
$typeDossierActionService = $this->getObjectInstancier()->getInstance(TypeDossierActionService::class);
$type_dossier_action_message = $typeDossierActionService->getById($id_t)[0]['message'];
$this->assertEquals("Le type de dossier personnalisé $id_type_dossier a été créé", $type_dossier_action_message);
}
/**
......@@ -182,6 +187,10 @@ class TypeDossierControlerTest extends ControlerTestCase
} catch (Exception $e) {
$this->assertRegExp("#/TypeDossier/editionEtape\?id_t=$id_t&num_etape=0#", $e->getMessage());
}
$typeDossierActionService = $this->getObjectInstancier()->getInstance(TypeDossierActionService::class);
$type_dossier_action_message = $typeDossierActionService->getById($id_t)[0]['message'];
$this->assertEquals("La modification des étapes du cheminement a été enregistrée", $type_dossier_action_message);
}
public function testDoNewEtapeActionNoSpecificData()
......@@ -196,6 +205,10 @@ class TypeDossierControlerTest extends ControlerTestCase
} catch (Exception $e) {
$this->assertRegExp("#/TypeDossier/detail\?id_t=$id_t#", $e->getMessage());
}
$typeDossierActionService = $this->getObjectInstancier()->getInstance(TypeDossierActionService::class);
$type_dossier_action_message = $typeDossierActionService->getById($id_t)[0]['message'];
$this->assertEquals("La modification des étapes du cheminement a été enregistrée", $type_dossier_action_message);
}
public function testDelete()
......
......@@ -35,9 +35,9 @@ class TypeDossierDeletionServiceTest extends PastellTestCase
$journal_raw_data
);
$log_message = $this->getLogRecords()[1]['message'];
$log_message = $this->getLogRecords()[0]['message'];
$this->assertRegExp(
"#Ajout au journal \(id_j=2\): 12 - 0 - 1 - 0 - Supprimé - Suppression du type de dossier id_t=1#",
"#Ajout au journal \(id_j=1\): 12 - 0 - 1 - 0 - Supprimé - Suppression du type de dossier id_t=1#",
$log_message
);
}
......
......@@ -65,53 +65,6 @@ class TypeDossierEditionServiceTest extends PastellTestCase
$typeDossierEditionService->create($typeDossierProperties);
}
/**
* @throws TypeDossierException
*/
public function testCreateAndEdit()
{
$typeDossierProperties = new TypeDossierProperties();
$typeDossierProperties->id_type_dossier = 'test-42';
$typeDossierEditionService = $this->getTypeDossierEditionService();
$id_t = $typeDossierEditionService->create($typeDossierProperties);
$journal_message = $this->getJournal()->getAll()[0]['message'];
$journal_export_json = '{' . explode('{', $journal_message, 2)[1];
$journal_raw_data = json_decode($journal_export_json, true)['raw_data'];
$expected_journal_raw_data = json_decode(file_get_contents(
__DIR__ . "/fixtures/type_dossier_create_service_journal_message_raw_data.txt"
), true);
$this->assertEquals(
$expected_journal_raw_data,
$journal_raw_data
);
$log_message = $this->getLogRecords()[0]['message'];
$this->assertRegExp(
"#Ajout au journal \(id_j=1\): 12 - 0 - 1 - 0 - Ajouté - Ajout du type de dossier id_t=1#",
$log_message
);
$this->getTypeDossierEditionService()->renameTypeDossierId("test-42", "test-43");
$typeDossierProperties->id_type_dossier = 'test-43';
$typeDossierEditionService->edit($id_t, $typeDossierProperties);
$journal_message = $this->getJournal()->getAll()[0]['message'];
$journal_export_json = '{' . explode('{', $journal_message, 2)[1];
$journal_raw_data = json_decode($journal_export_json, true)['raw_data'];
$expected_journal_raw_data = json_decode(file_get_contents(
__DIR__ . "/fixtures/type_dossier_edit_service_journal_message_raw_data.txt"
), true);
$this->assertEquals(
$expected_journal_raw_data,
$journal_raw_data
);
$log_message = $this->getLogRecords()[1]['message'];
$this->assertRegExp(
"#Ajout au journal \(id_j=2\): 12 - 0 - 1 - 0 - Modifié - Modification du type de dossier id_t=1#",
$log_message