diff --git a/CHANGELOG.md b/CHANGELOG.md
index f597d32b7af7f1ff643727ef62b5da1ca22c2bda..0b63ac8b1504143648bd3e359f65be5fbcbf291d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,10 @@
 
 ## 5.1.1 -
 
+### Évolutions
+
+- Permettre de poster les Pes Acquit Retour #1156
+
 ### Corrections
 
 - Correction de la correspondance simulateur/ftp pour les instances de développement #1240
diff --git a/config/services.yaml b/config/services.yaml
index 300d65a1ec0bb21f7269089d8939a37d6f08f311..1cad16defb43991e53d3bb46dd93d86c87ad3ae3 100644
--- a/config/services.yaml
+++ b/config/services.yaml
@@ -151,6 +151,9 @@ services:
   S2lowLegacy\Lib\OpenStackContainerFetcher:
     autowire: false #Pas un service, est renvoyé par une factory
 
+  S2lowLegacy\Lib\PesAllerData:
+    autowire: false #Pas un service, est renvoyé par une factory
+
   S2lowLegacy\Lib\Siren:
     autowire: false #Pas un service, est renvoyé par une factory
 
diff --git a/docker-resources/database/database_populate.json b/docker-resources/database/database_populate.json
index 52c98c4ff5018a9be18d5b771a8fbf735bfc9fdd..b269f9fa2e99b399d9d81b509b991a8fd4647cc6 100644
--- a/docker-resources/database/database_populate.json
+++ b/docker-resources/database/database_populate.json
@@ -3039,6 +3039,10 @@
         {
             "id": "23",
             "name": "Impossible d'envoyer au SAE (documents indisponibles)"
+        },
+        {
+            "id": "24",
+            "name": "Transmis. Aucun Ack attendu."
         }
     ]
 }
diff --git a/lib/HeliosNamesGenerator.php b/lib/HeliosNamesGenerator.php
new file mode 100644
index 0000000000000000000000000000000000000000..ebd607e877996b26c33ef8771b16a621f9a8fc80
--- /dev/null
+++ b/lib/HeliosNamesGenerator.php
@@ -0,0 +1,25 @@
+<?php
+
+namespace S2lowLegacy\Lib;
+
+class HeliosNamesGenerator
+{
+    public function getP_MSGFromParameters(string $cod_col, string $id_post, string $cod_bud): string
+    {
+        return 'PES#' . $cod_col . '#' . $id_post . '#' . $cod_bud;
+    }
+
+    public function getP_MSGFromPesAllerData(PesAllerData $data): string
+    {
+        return $this->getP_MSGFromParameters(
+            $data->cod_col,
+            $data->id_post,
+            $data->cod_bud
+        );
+    }
+
+    public function createCompleteName(string $siren, string $numero): string
+    {
+        return "PESALR2_{$siren}_" . date('ymd') . "_{$numero}.xml";
+    }
+}
diff --git a/lib/PesAller.php b/lib/PesAller.php
deleted file mode 100644
index f4f17aadd435b1afd8e8a70876ebbd58a7b3be45..0000000000000000000000000000000000000000
--- a/lib/PesAller.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-
-namespace S2lowLegacy\Lib;
-
-use Exception;
-
-class PesAller
-{
-    public function getP_MSG($pes_aller_path)
-    {
-        $pes_xml = simplexml_load_file($pes_aller_path, 'SimpleXMLElement', LIBXML_PARSEHUGE);
-        if (is_null($pes_xml) || is_null($pes_xml->EnTetePES) || is_null($pes_xml->EnTetePES->CodCol)) {    //Quickfix php8
-            throw new Exception("La balise EnTetePES/CodCol n'est pas présente ou est vide");
-        }
-        $cod_col = $pes_xml->EnTetePES->CodCol['V'];
-        if (! $cod_col) {
-            throw new Exception("La balise EnTetePES/CodCol n'est pas présente ou est vide");
-        }
-        $id_post = $pes_xml->EnTetePES->IdPost['V'];
-        if (! $id_post) {
-            throw new Exception("La balise EnTetePES/IdPost n'est pas présente ou est vide");
-        }
-        $cod_bud = $pes_xml->EnTetePES->CodBud['V'];
-        if (! $cod_bud) {
-            throw new Exception("La balise EnTetePES/CodBud n'est pas présente ou est vide");
-        }
-        return $this->getP_MSGFromParameters($cod_col, $id_post, $cod_bud);
-    }
-
-    /**
-     * @param string $cod_col
-     * @param string $id_post
-     * @param string $cod_bud
-     * @return string
-     */
-    public function getP_MSGFromParameters(string $cod_col, string $id_post, string $cod_bud): string
-    {
-        return "PES#" . $cod_col . "#" . $id_post . "#" . $cod_bud;
-    }
-}
diff --git a/lib/PesAllerData.php b/lib/PesAllerData.php
new file mode 100644
index 0000000000000000000000000000000000000000..de4254a0ca2bddde145dad155c7773460c5243c1
--- /dev/null
+++ b/lib/PesAllerData.php
@@ -0,0 +1,14 @@
+<?php
+
+namespace S2lowLegacy\Lib;
+
+class PesAllerData
+{
+    public function __construct(
+        public readonly bool $isPesAcquitRetour,
+        public readonly string $cod_col,
+        public readonly string $id_post,
+        public readonly string $cod_bud
+    ) {
+    }
+}
diff --git a/lib/PesAllerReader.php b/lib/PesAllerReader.php
new file mode 100644
index 0000000000000000000000000000000000000000..6285a4529f0aac169c83a346289ab9bbfd47d748
--- /dev/null
+++ b/lib/PesAllerReader.php
@@ -0,0 +1,44 @@
+<?php
+
+namespace S2lowLegacy\Lib;
+
+use Exception;
+
+class PesAllerReader
+{
+    /**
+     * @throws Exception
+     */
+    public function getPesAllerData($pes_aller_path): PesAllerData
+    {
+        $pes_xml = simplexml_load_file($pes_aller_path, 'SimpleXMLElement', LIBXML_PARSEHUGE);
+        if (!$pes_xml || empty($pes_xml->EnTetePES)) {
+            throw new Exception("La balise EnTetePES n'est pas présente ou est vide");
+        }
+        $isPesAcquitRetour = $pes_xml->getName() === 'PES_ACQUIT_RETOUR';
+
+        if ($isPesAcquitRetour) {
+            $cod_col = $pes_xml->EnTetePES->CodColl['V'];
+        } else {
+            $cod_col = $pes_xml->EnTetePES->CodCol['V'];
+        }
+
+        if (! $cod_col) {
+            throw new Exception('La balise EnTetePES/CodCol ou EnTetePES/CodColl n\'est pas présente ou est vide');
+        }
+        $id_post = $pes_xml->EnTetePES->IdPost['V'];
+        if (! $id_post) {
+            throw new Exception("La balise EnTetePES/IdPost n'est pas présente ou est vide");
+        }
+        $cod_bud = $pes_xml->EnTetePES->CodBud['V'];
+        if (! $cod_bud) {
+            throw new Exception("La balise EnTetePES/CodBud n'est pas présente ou est vide");
+        }
+        return new PesAllerData(
+            $isPesAcquitRetour,
+            $cod_col,
+            $id_post,
+            $cod_bud
+        );
+    }
+}
diff --git a/model/HeliosTransactionsSQL.php b/model/HeliosTransactionsSQL.php
index ee5bcad7743333c9e02e66756dc88454f4771fec..ba36a57fc0b6b8042fb39982fecbb6b41e861e5a 100644
--- a/model/HeliosTransactionsSQL.php
+++ b/model/HeliosTransactionsSQL.php
@@ -28,6 +28,9 @@ class HeliosTransactionsSQL extends SQL
     public const STATUS_ERREUR_LORS_DE_L_ENVOI_SAE = 20;
 
     public const DETRUITE = 22;
+
+    public const TRANSMIS_SANS_ACK = 24;
+
     private const SEND_WARNING_AFTER_SECOND = 172800;
 
     private const WORKFLOW_MESSAGE_MAX_LENGTH = 512;
diff --git a/src/Command/Helios/TestDGFiPConnectionCommand.php b/src/Command/Helios/TestDGFiPConnectionCommand.php
index 26e95ee2ceee54f62abc342a3e3487086343e3e2..6e82fa05a669b4b92ea30ed06d310fecc38b0e11 100644
--- a/src/Command/Helios/TestDGFiPConnectionCommand.php
+++ b/src/Command/Helios/TestDGFiPConnectionCommand.php
@@ -7,7 +7,8 @@ use S2low\Services\Helios\DGFiPConnection\DGFiPConnectionBuilder;
 use S2low\Services\Helios\DGFiPConnection\DGFiPConnectionConfiguration;
 use S2low\Services\Helios\DGFiPConnection\DGFiPConnectionsManager;
 use S2low\Services\Helios\DGFiPConnection\DGFiPConnector;
-use S2lowLegacy\Lib\PesAller;
+use S2lowLegacy\Lib\HeliosNamesGenerator;
+use S2lowLegacy\Lib\PesAllerReader;
 use Symfony\Component\Console\Command\Command;
 use Symfony\Component\Console\Input\InputInterface;
 use Symfony\Component\Console\Input\InputOption;
@@ -19,13 +20,7 @@ use Symfony\Component\Console\Style\SymfonyStyle;
  */
 class TestDGFiPConnectionCommand extends Command
 {
-    /**
-     * @var \S2low\Services\Helios\DGFiPConnection\DGFiPConnectionsManager
-     */
     private DGFiPConnectionsManager $DGFiPConnectionsManager;
-    /**
-     * @var \S2low\Services\Helios\DGFiPConnection\DGFiPConnectionBuilder
-     */
     private DGFiPConnectionBuilder $connectionBuilder;
 
     /**
@@ -34,7 +29,9 @@ class TestDGFiPConnectionCommand extends Command
      */
     public function __construct(
         DGFiPConnectionsManager $DGFiPConnectionsManager,
-        DGFiPConnectionBuilder $connectionBuilder
+        DGFiPConnectionBuilder $connectionBuilder,
+        private readonly PesAllerReader $pesAllerReader,
+        private readonly HeliosNamesGenerator $producer
     ) {
         parent::__construct();
         $this->DGFiPConnectionsManager = $DGFiPConnectionsManager;
@@ -203,8 +200,7 @@ class TestDGFiPConnectionCommand extends Command
             $p_dest = $input->getOption('p_dest');
             $pAppli = $input->getOption('pAppli') ?? $defaultConfiguration->getHeliosFtpAppli();
 
-            $pesAller = new PesAller();
-            $p_msg = $pesAller->getP_MSG($file_path);
+            $p_msg = $this->producer->getP_MSGFromPesAllerData($this->pesAllerReader->getPesAllerData($file_path));
 
             $io->title("Envoi de  de {$file_path}\n");
             $io->definitionList(
diff --git a/src/Controller/HeliosAdminController.php b/src/Controller/HeliosAdminController.php
index ef9a31c41f47e3704bc3f6997e8795b1cf5dee28..9a54abd4b16ce80076555f20126e4cf21a060dfe 100644
--- a/src/Controller/HeliosAdminController.php
+++ b/src/Controller/HeliosAdminController.php
@@ -5,7 +5,7 @@ namespace S2low\Controller;
 use Exception;
 use S2low\Services\MailActesNotifications\MailerSymfonyFactory;
 use S2lowLegacy\Class\Initialisation;
-use S2lowLegacy\Lib\PesAller;
+use S2lowLegacy\Lib\HeliosNamesGenerator;
 use S2lowLegacy\Model\HeliosTransactionsSQL;
 use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
 use Symfony\Component\HttpFoundation\RedirectResponse;
@@ -13,21 +13,13 @@ use Symfony\Component\Routing\Annotation\Route;
 
 class HeliosAdminController extends AbstractController
 {
-    private HeliosTransactionsSQL $heliosTransactionsSQL;
-    private Initialisation $initialisation;
-    private string $pAppli;
-    private MailerSymfonyFactory $mailerSymfonyFactory;
-
     public function __construct(
-        HeliosTransactionsSQL $heliosTransactionsSQL,
-        MailerSymfonyFactory $mailerSymfonyFactory,
-        string $helios_ftp_p_appli,
-        Initialisation $initialisation
+        private readonly HeliosTransactionsSQL $heliosTransactionsSQL,
+        private readonly MailerSymfonyFactory $mailerSymfonyFactory,
+        private readonly string $helios_ftp_p_appli,
+        private readonly Initialisation $initialisation,
+        private readonly HeliosNamesGenerator $namesGenerator
     ) {
-        $this->heliosTransactionsSQL = $heliosTransactionsSQL;
-        $this->mailerSymfonyFactory = $mailerSymfonyFactory;
-        $this->pAppli = $helios_ftp_p_appli;
-        $this->initialisation = $initialisation;
     }
 
     /**
@@ -54,7 +46,7 @@ class HeliosAdminController extends AbstractController
         );
 
 
-        if (count($transactions_list_Gateway) && count($transactions_list_Passtrans)) {
+        if ((count($transactions_list_Gateway) + count($transactions_list_Passtrans)) === 0) {
             $subject = 'Aucune transaction n est reste en transmis';
         } else {
             $transactionsTransmises = count($transactions_list_Gateway) + count($transactions_list_Passtrans);
@@ -77,9 +69,9 @@ class HeliosAdminController extends AbstractController
             unset($line['id']);
             unset($line['filename']);
             $p_dest = $line['helios_ftp_dest'];
-            $pAppli = $this->pAppli;
+            $pAppli = $this->helios_ftp_p_appli;
 
-            $p_msg = (new PesAller())->getP_MSGFromParameters(
+            $p_msg = $this->namesGenerator->getP_MSGFromParameters(
                 $line['xml_cod_col'],
                 $line['xml_id_post'],
                 $line['xml_cod_bud']
diff --git a/src/Services/Helios/HeliosEnvoiControler.php b/src/Services/Helios/HeliosEnvoiControler.php
index 96bbd312949109655e7c54dc3aa97b18d244c50a..2628ee20ec5e7933a60af7398897b90ed0a5ba9e 100644
--- a/src/Services/Helios/HeliosEnvoiControler.php
+++ b/src/Services/Helios/HeliosEnvoiControler.php
@@ -13,10 +13,10 @@ use S2lowLegacy\Class\Log;
 use S2lowLegacy\Class\S2lowLogger;
 use S2lowLegacy\Class\VerifyPemCertificateFactory;
 use S2lowLegacy\Class\WorkerScript;
+use S2lowLegacy\Lib\HeliosNamesGenerator;
 use S2lowLegacy\Lib\PemCertificateFactory;
-use S2lowLegacy\Lib\PesAller;
+use S2lowLegacy\Lib\PesAllerReader;
 use S2lowLegacy\Lib\PKCS12;
-use S2lowLegacy\Lib\SQLQuery;
 use S2lowLegacy\Lib\X509Certificate;
 use S2lowLegacy\Lib\XadesSignature;
 use S2lowLegacy\Lib\XadesSignatureParser;
@@ -28,56 +28,37 @@ use ZipArchive;
 
 class HeliosEnvoiControler
 {
-    private $sqlQuery;
-    private $heliosTransactionsSQL;
-    private $authoritySQL;
-    private $fichierCompteur;
-    private $heliosTransmissionWindowsSQL;
-
-    private $do_not_verify_nom_fic_unicity;
-
-    private $pesAllerRetriever;
-
-    private $antivirus;
-
-    private $workerScript;
-    /**
-     * @var \S2low\Services\Helios\DGFiPConnection\DGFiPConnectionsManager
-     */
-    private DGFiPConnectionsManager $heliosConnectionsConfigurationManager;
-    /**
-     * @var \S2low\Services\MailActesNotifications\MailerSymfonyFactory
-     */
-    private MailerSymfonyFactory $mailerFactory;
-    /**
-     * @var \S2lowLegacy\Class\S2lowLogger
-     */
-    private S2lowLogger $logger;
+    private bool $do_not_verify_nom_fic_unicity = false;
+    private XadesSignature $xadesSignature;
 
     public function __construct(
-        SQLQuery $sqlQuery,
-        PesAllerRetriever $pesAllerRetriever,
-        Antivirus $antivirus,
-        WorkerScript $workerScript,
-        MailerSymfonyFactory $mailerSymfonyFactory,
-        DGFiPConnectionsManager $heliosConnectionsConfigurationManager,
-        FichierCompteur $fichierCompteur,
-        S2lowLogger $logger
+        private readonly AuthoritySiretSQL $authoritySiretSQL,
+        private readonly HeliosTransactionsSQL $heliosTransactionsSQL,
+        private readonly AuthoritySQL $authoritySQL,
+        private readonly HeliosTransmissionWindowsSQL $heliosTransmissionWindowsSQL,
+        private readonly PesAllerRetriever $pesAllerRetriever,
+        private readonly Antivirus $antivirus,
+        private readonly WorkerScript $workerScript,
+        private readonly MailerSymfonyFactory $mailerFactory,
+        private readonly DGFiPConnectionsManager $heliosConnectionsConfigurationManager,
+        private readonly FichierCompteur $fichierCompteur,
+        private readonly S2lowLogger $logger,
+        private readonly PesAllerReader $pesAllerReader,
+        private readonly HeliosNamesGenerator $namesGenerator,
+        VerifyPemCertificateFactory $verifyPemFactory
     ) {
-        $this->sqlQuery = $sqlQuery;
-        $this->heliosTransactionsSQL = new HeliosTransactionsSQL($this->sqlQuery);
-        $this->authoritySQL = new AuthoritySQL($sqlQuery);
-        $this->fichierCompteur = $fichierCompteur;
-        $this->heliosTransmissionWindowsSQL = new HeliosTransmissionWindowsSQL($sqlQuery);
-        $this->pesAllerRetriever = $pesAllerRetriever;
-        $this->antivirus = $antivirus;
-        $this->workerScript = $workerScript;
-        $this->mailerFactory = $mailerSymfonyFactory;
-        $this->heliosConnectionsConfigurationManager = $heliosConnectionsConfigurationManager;
-        $this->logger = $logger;
+        $this->xadesSignature = new XadesSignature(
+            XMLSEC1_PATH,
+            new PKCS12(),
+            new X509Certificate(),
+            EXTENDED_VALIDCA_PATH,
+            new XadesSignatureParser(),
+            new PemCertificateFactory(),
+            $verifyPemFactory->get(EXTENDED_VALIDCA_PATH)
+        );
     }
 
-    public function setDoNotVerifyNomFicUnicity($do_not_verify_nom_fic_unicity)
+    public function setDoNotVerifyNomFicUnicity(bool $do_not_verify_nom_fic_unicity): void
     {
         $this->do_not_verify_nom_fic_unicity = $do_not_verify_nom_fic_unicity;
     }
@@ -86,7 +67,7 @@ class HeliosEnvoiControler
     /**
      * @throws \Exception
      */
-    public function validateOneTransaction($transaction_id)
+    public function validateOneTransaction($transaction_id): void
     {
         libxml_use_internal_errors(true);
         $transactionInfo = $this->heliosTransactionsSQL->getInfo($transaction_id);
@@ -154,35 +135,25 @@ class HeliosEnvoiControler
             $this->updateStatus($transaction_id, HeliosTransactionsSQL::ERREUR, $message, $transactionInfo['user_id']);
             return;
         }
-        $verifyPemFactory = new VerifyPemCertificateFactory();
-        $xadesSignature = new XadesSignature(
-            XMLSEC1_PATH,
-            new PKCS12(),
-            new X509Certificate(),
-            EXTENDED_VALIDCA_PATH,
-            new XadesSignatureParser(),
-            new PemCertificateFactory(),
-            $verifyPemFactory->get(EXTENDED_VALIDCA_PATH)
-        );
 
         if (sha1_file($file_path) != $transactionInfo['sha1']) {
             $this->updateStatus(
                 $transaction_id,
                 HeliosTransactionsSQL::ERREUR,
-                "Le fichier a été modifé depuis son postage sur la plateforme",
+                'Le fichier a été modifé depuis son postage sur la plateforme',
                 $transactionInfo['user_id']
             );
             return;
         }
 
-        if ($xadesSignature->isSigned($file_path)) {
+        if ($this->xadesSignature->isSigned($file_path)) {
             try {
-                $xadesSignature->verify($file_path);
+                $this->xadesSignature->verify($file_path);
             } catch (Exception $exception) {
                 $this->updateStatus(
                     $transaction_id,
                     HeliosTransactionsSQL::ERREUR,
-                    "La signature du fichier est invalide : " . $exception->getMessage(),
+                    'La signature du fichier est invalide : ' . $exception->getMessage(),
                     $transactionInfo['user_id']
                 );
                 return;
@@ -203,13 +174,10 @@ class HeliosEnvoiControler
             return;
         }
 
-
-
         $siret = $pes_xml->EnTetePES->IdColl['V'];
-        $authoritySiret = new AuthoritySiretSQL($this->sqlQuery);
-        $authoritySiret->add($transactionInfo['authority_id'], $siret);
+        $this->authoritySiretSQL->add($transactionInfo['authority_id'], $siret);
 
-        $usePasstransMsg = $authorityInfo['helios_use_passtrans'] ? " [Passtrans]" : "";
+        $usePasstransMsg = $authorityInfo['helios_use_passtrans'] ? ' [Passtrans]' : '';
         $message = "Transaction $transaction_id dans la file d'attente" . $usePasstransMsg;
         $this->updateStatus($transaction_id, HeliosTransactionsSQL::ATTENTE, $message, $transactionInfo['user_id']);
 
@@ -222,13 +190,13 @@ class HeliosEnvoiControler
         libxml_use_internal_errors(false);
     }
 
-    private function isInIso8859($pes_content)
+    private function isInIso8859($pes_content): bool
     {
-        $first_line = mb_substr($pes_content, 0, 50);
-        return preg_match("#ISO-8859-1#i", $first_line);
+        $first_line = strtoupper(mb_substr($pes_content, 0, 50));
+        return str_contains($first_line, 'ISO-8859-1');
     }
 
-    private function verifNomFicUnicity($authorityInfo, $info_from_pes_aller)
+    private function verifNomFicUnicity($authorityInfo, $info_from_pes_aller): bool
     {
         if ($this->do_not_verify_nom_fic_unicity) { //ARE YOU SURE ?
             if ($authorityInfo['helios_do_not_verify_nom_fic_unicity']) { //VERY SURE ?
@@ -242,7 +210,7 @@ class HeliosEnvoiControler
         );
     }
 
-    private function updateStatus($transaction_id, $status_id, $message, $user_id)
+    private function updateStatus($transaction_id, $status_id, $message, $user_id): void
     {
         $this->logger->info($message);
         $this->heliosTransactionsSQL->updateStatus($transaction_id, $status_id, $message);
@@ -250,9 +218,9 @@ class HeliosEnvoiControler
     }
 
     /**
-     * @throws \Exception
+     * @throws Exception
      */
-    public function sendOneTransaction($transaction_id, bool $usePasstrans)
+    public function sendOneTransaction($transaction_id, bool $usePasstrans): void
     {
         $file_sending_repository = HELIOS_FILES_UPLOAD_TMP;
 
@@ -267,7 +235,7 @@ class HeliosEnvoiControler
                 $this->logger->info($message);
                 $mail = $this->mailerFactory->getInstance();
                 $mail->addRecipient(EMAIL_ADMIN);
-                $mail->sendMail("Transaction Helios bloquée", $message);
+                $mail->sendMail('Transaction Helios bloquée', $message);
                 $this->heliosTransactionsSQL->setSendWarning($transaction_id);
             }
             return;
@@ -275,13 +243,16 @@ class HeliosEnvoiControler
 
         $authorityInfo = $this->authoritySQL->getInfo($transactionInfo['authority_id']);
 
-        $completeName = $this->createCompleteName($transactionInfo['siren']);
+        $completeName = $this->namesGenerator->createCompleteName(
+            $transactionInfo['siren'],
+            $this->fichierCompteur->getNumero()
+        );
         $this->heliosTransactionsSQL->setCompleteName($transaction_id, $completeName);
         $this->logger->info("Nom du fichier à envoyer : $completeName");
 
         $file_path = $this->pesAllerRetriever->getPath($transactionInfo['sha1']);
 
-        $file_path_with_complete_name = $file_sending_repository . "/" . $completeName;
+        $file_path_with_complete_name = $file_sending_repository . '/' . $completeName;
         if (! copy($file_path, $file_path_with_complete_name)) {
             $this->logger->error("Transaction $transaction_id : échec de la copie...: cp $file_path $file_path_with_complete_name");
             return;
@@ -306,9 +277,9 @@ class HeliosEnvoiControler
             return;
         }
 
-        $pesAller = new PesAller();
         try {
-            $p_msg = $pesAller->getP_MSG($file_path);
+            $pesAllerData = $this->pesAllerReader->getPesAllerData($file_path);
+            $p_msg = $this->namesGenerator->getP_MSGFromPesAllerData($pesAllerData);
         } catch (Exception $e) {
             $message = "Transaction $transaction_id : " . $e->getMessage();
             $this->updateStatus($transaction_id, HeliosTransactionsSQL::ERREUR, $message, $transactionInfo['user_id']);
@@ -319,7 +290,7 @@ class HeliosEnvoiControler
             return;
         }
 
-        if (! $authorityInfo["helios_ftp_dest"]) {
+        if (! $authorityInfo['helios_ftp_dest']) {
             $message = "Transaction $transaction_id : les propriétés Helios FTP ne sont pas configurées correctement";
             $this->updateStatus($transaction_id, HeliosTransactionsSQL::ERREUR, $message, $transactionInfo['user_id']);
             unlink($file_path_with_complete_name);
@@ -327,23 +298,28 @@ class HeliosEnvoiControler
         }
 
         try {
-            if ($authorityInfo["helios_use_passtrans"] != $usePasstrans) {
+            if ($authorityInfo['helios_use_passtrans'] != $usePasstrans) {
                 $message = "Transaction $transaction_id : la transaction a été aiguillée sur la mauvaise file passtrans";
                 $this->updateStatus($transaction_id, HeliosTransactionsSQL::ERREUR, $message, $transactionInfo['user_id']);
                 unlink($file_path_with_complete_name);
                 return;
             }
             $this->heliosConnectionsConfigurationManager
-                ->get($usePasstrans)->sendFileOnUniqueConnection($authorityInfo["helios_ftp_dest"], $p_msg, $file_to_send);
+                ->get($usePasstrans)->sendFileOnUniqueConnection($authorityInfo['helios_ftp_dest'], $p_msg, $file_to_send);
         } catch (Exception $e) {
             $this->logger->error("Transaction $transaction_id: Erreur lors du postage de la transaction Helios $transaction_id : " . $e->getMessage());
             unlink($file_path_with_complete_name);
             return;
         }
 
-        $passtransMessage = $usePasstrans ? " [Passtrans]" : "";
+        $passtransMessage = $usePasstrans ? ' [Passtrans]' : '';
         $message = "Transaction $transaction_id transmise au serveur." . $passtransMessage;
-        $this->updateStatus($transaction_id, HeliosTransactionsSQL::TRANSMIS, $message, $transactionInfo['user_id']);
+        $this->updateStatus(
+            $transaction_id,
+            $this->getStatutApresTransmission($pesAllerData->isPesAcquitRetour),
+            $message,
+            $transactionInfo['user_id']
+        );
 
         $this->heliosTransmissionWindowsSQL->addFile($transactionInfo['file_size']);
 
@@ -353,11 +329,12 @@ class HeliosEnvoiControler
         unlink($file_path_with_complete_name);
     }
 
-    private function createCompleteName($siren)
+    private function getStatutApresTransmission(bool $isPesAcquitRetour): int
     {
-        $numero = $this->fichierCompteur->getNumero();
-        $date = date("ymd");
-        return "PESALR2_{$siren}_{$date}_{$numero}.xml";
+        if ($isPesAcquitRetour) {
+            return HeliosTransactionsSQL::TRANSMIS_SANS_ACK;
+        }
+        return HeliosTransactionsSQL::TRANSMIS;
     }
 
 
@@ -365,13 +342,13 @@ class HeliosEnvoiControler
     {
     }
 
-    public function extratInfoFromPESAller(SimpleXMLElement $pes_xml)
+    public function extratInfoFromPESAller(SimpleXMLElement $pes_xml): array
     {
-        $info['nom_fic'] = strval($pes_xml->Enveloppe->Parametres->NomFic['V']);
-        $info['cod_col'] = strval($pes_xml->EnTetePES->CodCol['V']);
-        $info['cod_bud'] = strval($pes_xml->EnTetePES->CodBud['V']);
-        $info['id_post'] = strval($pes_xml->EnTetePES->IdPost['V']);
-        return $info;
+        $info_pes['nom_fic'] = strval($pes_xml->Enveloppe->Parametres->NomFic['V']);
+        $info_pes['cod_col'] = strval($pes_xml->EnTetePES->CodCol['V']);
+        $info_pes['cod_bud'] = strval($pes_xml->EnTetePES->CodBud['V']);
+        $info_pes['id_post'] = strval($pes_xml->EnTetePES->IdPost['V']);
+        return $info_pes;
     }
 
 
diff --git a/test/PHPUnit/helios/fixtures/PES_ACQUIT_RETOUR.xml b/test/PHPUnit/helios/fixtures/PES_ACQUIT_RETOUR.xml
new file mode 100644
index 0000000000000000000000000000000000000000..6d2f180f3b198cf0e95d96735fa16113955fbcc6
--- /dev/null
+++ b/test/PHPUnit/helios/fixtures/PES_ACQUIT_RETOUR.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<n:PES_ACQUIT_RETOUR xmlns:n="http://www.minefi.gouv.fr/cp/helios/pes_v2/Rev0/aller/ack">
+    <Enveloppe>
+        <Parametres>
+            <Version V="1"/>
+            <TypFic V="PES2R_DEP"/>
+            <NomFic V="PES2R_DEP_P_000_00_000000_00000000_2025010107_20250101010000.xml"/>
+        </Parametres>
+    </Enveloppe>
+    <EnTetePES>
+        <DteStr V="2025-01-01"/>
+        <IdPost V="123456"/>
+        <LibellePoste V="UNDEPARTEMENT"/>
+        <IdColl V="49101169800033"/>
+        <CodColl V="007"/>
+        <CodBud V="12"/>
+        <LibelleColBud V="LIBELLECODBUD"/>
+    </EnTetePES>
+    <ACQUIT_RETOUR>
+        <EnTeteAcquit_Retour>
+            <IdVer V="2"/>
+        </EnTeteAcquit_Retour>
+        <ElementACQUIT_RETOUR>
+            <DomaineAckRetour V="13"/>
+            <NomFichierRetour V="PES2R_DEP_P_710_20_044090_20250307_20250307_20250308182309.xml"/>
+            <TypRestit V="02"/>
+            <DateAcquit V="2025-03-10"/>
+        </ElementACQUIT_RETOUR>
+    </ACQUIT_RETOUR>
+</n:PES_ACQUIT_RETOUR>
\ No newline at end of file
diff --git a/test/PHPUnit/helios/fixtures/pes_aller_PasDeNomFic.xml b/test/PHPUnit/helios/fixtures/pes_aller_PasDeNomFic.xml
new file mode 100644
index 0000000000000000000000000000000000000000..d5fbf159f69543c188e9653a7651a30310047cd1
--- /dev/null
+++ b/test/PHPUnit/helios/fixtures/pes_aller_PasDeNomFic.xml
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<n:PES_Aller xmlns:n="http://www.minefi.gouv.fr/cp/helios/pes_v2/Rev0/aller" xmlns:acta="http://www.minefi.gouv.fr/cp/helios/pes_v2/etatactif/r0/aller" xmlns:buda="http://www.minefi.gouv.fr/cp/helios/pes_v2/budget/r0/aller" xmlns:cm="http://www.minefi.gouv.fr/cp/helios/pes_v2/commun" xmlns:depa="http://www.minefi.gouv.fr/cp/helios/pes_v2/depense/r0/aller" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:empa="http://www.minefi.gouv.fr/cp/helios/pes_v2/emprunt/r0/aller" xmlns:mara="http://www.minefi.gouv.fr/cp/helios/pes_v2/marche/r0/aller" xmlns:reca="http://www.minefi.gouv.fr/cp/helios/pes_v2/recette/r0/aller" xmlns:rola="http://www.minefi.gouv.fr/cp/helios/pes_v2/role/r0/aller" xmlns:xad="http://uri.etsi.org/01903/v1.1.1#" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Id="ID291164614">
+ <Enveloppe>
+  <Parametres>
+   <Version V="1"/>
+   <TypFic V="PESALR2"/>
+  </Parametres>
+  <Emetteur>
+   <Sigle V="EMSIGLE"/>
+
+   <Adresse V="EMADRESSE"/>
+  </Emetteur>
+  <Recepteur>
+   <Sigle V="HELIOS"/>
+   <Adresse V="READRESSE"/>
+  </Recepteur>
+ </Enveloppe>
+ <EnTetePES>
+  <DteStr V="2023-02-08"/>
+
+  <IdPost V="034000"/>
+  <IdColl V="12345678912345"/>
+  <CodCol V="1234"/>
+  <CodBud V="12"/>
+  <LibelleColBud V="COMMUNE"/>
+ </EnTetePES>
+ <PES_DepenseAller>
+  <EnTeteDepense>
+   <IdVer V="1"/>
+
+   <InfoDematerialisee V="0"/>
+  </EnTeteDepense>
+  <Bordereau Id="BORD407357">
+   <BlocBordereau>
+    <Exer V="2009"/>
+    <IdBord V="1234567"/>
+    <DteBordEm V="2009-07-16"/>
+    <TypBord V="01"/>
+    <NbrPce V="1"/>
+
+    <MtCumulAnnuel V="6312190.16"/>
+    <MtBordHT V="75724.75"/>
+   </BlocBordereau>
+   <Piece>
+    <BlocPiece>
+     <InfoPce>
+      <IdPce V="832"/>
+      <TypPce V="01"/>
+      <NatPce V="01"/>
+
+      <Obj V="TEST HOMOLOGATION"/>
+     </InfoPce>
+    </BlocPiece>
+    <LigneDePiece>
+     <BlocLignePiece>
+      <InfoLignePce>
+       <IdLigne V="1"/>
+       <Nature V="6553"/>
+       <Fonction V="113"/>
+
+       <LibVir1 V="ECHEANCIER"/>
+       <LibVir2 V="LE NUMERO N EST PAS PRECISE"/>
+       <ModRegl V="03"/>
+       <TVAIntraCom V="0"/>
+       <MtHT V="39724.75"/>
+      </InfoLignePce>
+     </BlocLignePiece>
+     <Tiers>
+      <InfoTiers>
+
+       <RefTiers V="811"/>
+       <CatTiers V="22"/>
+       <NatJur V="09"/>
+       <Nom V="PAIERIE DEPART. HERAULT"/>
+      </InfoTiers>
+      <Adresse>
+       <TypAdr V="1"/>
+       <Adr2 V="1000 RUE ALCO"/>
+       <CP V="34000"/>
+
+       <Ville V="MONTPELLIER"/>
+       <CodRes V="0"/>
+      </Adresse>
+      <CpteBancaire>
+       <CodeEtab V="30001"/>
+       <CodeGuic V="00866"/>
+       <IdCpte V="C7850000000"/>
+       <CleRib V="67"/>
+       <LibBanc V="LA BANQUE DU FUTUR"/>
+
+       <TitCpte V="PAIERIE DEPART. HERAULT"/>
+      </CpteBancaire>
+     </Tiers>
+    </LigneDePiece>
+   </Piece>
+  </Bordereau>
+  	
+ </PES_DepenseAller>
+ <PES_PJ>
+  <EnTetePES_PJ>
+
+   <IdVer V="1"/>
+  </EnTetePES_PJ>
+ <PJ><Contenu><Fichier>Ceci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un testCeci est un test</Fichier></Contenu></PJ></PES_PJ>
+ <PJ>
+  <Contenu>
+   <Fichier MIMEType="application/pdf">    
+   </Fichier>
+  </Contenu>
+ </PJ>
+</n:PES_Aller>
diff --git a/test/PHPUnit/lib/PesAllerTest.php b/test/PHPUnit/lib/PesAllerTest.php
index 9dec01d3a1a05baa75950edc9c413a9b8309895d..fc360974ef6c86b43eca063db2fbd61fc1cacfd6 100644
--- a/test/PHPUnit/lib/PesAllerTest.php
+++ b/test/PHPUnit/lib/PesAllerTest.php
@@ -1,27 +1,61 @@
 <?php
 
-use S2lowLegacy\Lib\PesAller;
+declare(strict_types=1);
 
-class PesAllerTest extends PHPUnit_Framework_TestCase
+namespace PHPUnit\lib;
+
+use Exception;
+use PHPUnit\Framework\TestCase;
+use S2lowLegacy\Lib\PesAllerReader;
+
+class PesAllerTest extends TestCase
 {
-    private $pesAller;
+    private PesAllerReader $pesAllerReader;
 
     protected function setUp(): void
     {
         parent::setUp();
-        $this->pesAller = new PesAller();
+        $this->pesAllerReader = new PesAllerReader();
+    }
+
+    /**
+     * @throws Exception
+     * @dataProvider bonsPesAllers
+     */
+    public function testGetPmsg(string $path, bool $isPesAcquitRetour, string $codColl, string $codBud, string $idPost): void
+    {
+        $pesAllerData = $this->pesAllerReader->getPesAllerData($path);
+        static::assertSame($isPesAcquitRetour, $pesAllerData->isPesAcquitRetour);
+        static::assertSame($codColl, $pesAllerData->cod_col);
+        static::assertSame($codBud, $pesAllerData->cod_bud);
+        static::assertSame($idPost, $pesAllerData->id_post);
+    }
+    public function bonsPesAllers(): array
+    {
+        return [
+            [ __DIR__ . '/fixtures/HELIOS_SIMU_ALR2_1444811220_681372666.xml',false,'123','12','034000'],
+            [__DIR__ . '/fixtures/PES_ACQUIT_RETOUR.xml', true,'007','12','123456']
+        ];
     }
 
-    public function testGetPmsg()
+    /**
+     * @throws Exception
+     * @dataProvider mauvaisPesAllers
+     */
+    public function testGetPmsgBadPesAller(string $path, string $message)
     {
-        $pes_aller_path = __DIR__ . "/fixtures/HELIOS_SIMU_ALR2_1444811220_681372666.xml";
-        $this->assertEquals("PES#123#034000#12", $this->pesAller->getP_MSG($pes_aller_path));
+        $this->expectException(Exception::class);
+        $this->expectExceptionMessage($message);
+        $this->pesAllerReader->getPesAllerData($path);
     }
 
-    public function testGetPmsgBadPesAller()
+    public function mauvaisPesAllers(): array
     {
-        $pes_aller_path = __DIR__ . "/fixtures/test.xml";
-        $this->setExpectedException("Exception", "La balise EnTetePES/CodCol n'est pas présente ou est vide");
-        $this->pesAller->getP_MSG($pes_aller_path);
+        return [
+            [__DIR__ . '/fixtures/test.xml', 'La balise EnTetePES n\'est pas présente ou est vide'],
+            [__DIR__ . '/fixtures/HELIOS_SIMU_ALR2_NoCodBud.xml','La balise EnTetePES/CodBud n\'est pas présente ou est vide' ],
+            [__DIR__ . '/fixtures/HELIOS_SIMU_ALR2_NoCodColl.xml', 'La balise EnTetePES/CodCol ou EnTetePES/CodColl n\'est pas présente ou est vide'],
+            [__DIR__ . '/fixtures/HELIOS_SIMU_ALR2_NoIdPost.xml', 'La balise EnTetePES/IdPost n\'est pas présente ou est vide']
+        ];
     }
 }
diff --git a/test/PHPUnit/lib/fixtures/HELIOS_SIMU_ALR2_NoCodBud.xml b/test/PHPUnit/lib/fixtures/HELIOS_SIMU_ALR2_NoCodBud.xml
new file mode 100644
index 0000000000000000000000000000000000000000..f3eb3cb47dbc3ef3cab83f09e4702eef4ccfd0df
--- /dev/null
+++ b/test/PHPUnit/lib/fixtures/HELIOS_SIMU_ALR2_NoCodBud.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<n:PES_Aller xmlns:n="http://www.minefi.gouv.fr/cp/helios/pes_v2/Rev0/aller"
+             xmlns:acta="http://www.minefi.gouv.fr/cp/helios/pes_v2/etatactif/r0/aller"
+             xmlns:buda="http://www.minefi.gouv.fr/cp/helios/pes_v2/budget/r0/aller"
+             xmlns:cm="http://www.minefi.gouv.fr/cp/helios/pes_v2/commun"
+             xmlns:depa="http://www.minefi.gouv.fr/cp/helios/pes_v2/depense/r0/aller"
+             xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:empa="http://www.minefi.gouv.fr/cp/helios/pes_v2/emprunt/r0/aller" xmlns:mara="http://www.minefi.gouv.fr/cp/helios/pes_v2/marche/r0/aller" xmlns:reca="http://www.minefi.gouv.fr/cp/helios/pes_v2/recette/r0/aller" xmlns:rola="http://www.minefi.gouv.fr/cp/helios/pes_v2/role/r0/aller" xmlns:xad="http://uri.etsi.org/01903/v1.1.1#" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Id="ID1551477369">
+ <Enveloppe>
+  <Parametres>
+   <Version V="1"/>
+   <TypFic V="PESALR2"/>
+   <NomFic V="HELIOS_SIMU_ALR2_1444811220_681372666.xml"/>
+  </Parametres>
+  <Emetteur>
+   <Sigle V="EMSIGLE"/>
+
+   <Adresse V="EMADRESSE"/>
+  </Emetteur>
+  <Recepteur>
+   <Sigle V="HELIOS"/>
+   <Adresse V="READRESSE"/>
+  </Recepteur>
+ </Enveloppe>
+ <EnTetePES>
+  <DteStr V="2015-10-14"/>
+
+  <IdPost V="034000"/>
+  <IdColl V="12345678912345"/>
+  <CodCol V="123"/>
+  <LibelleColBud V="COMMUNE"/>
+ </EnTetePES>
+ <PES_DepenseAller>
+  <EnTeteDepense>
+   <IdVer V="1"/>
+
+   <InfoDematerialisee V="0"/>
+  </EnTeteDepense>
+  <Bordereau Id="BORD262484">
+   <BlocBordereau>
+    <Exer V="2009"/>
+    <IdBord V="1234567"/>
+    <DteBordEm V="2009-07-16"/>
+    <TypBord V="01"/>
+    <NbrPce V="1"/>
+
+    <MtCumulAnnuel V="6312190.16"/>
+    <MtBordHT V="75724.75"/>
+   </BlocBordereau>
+   <Piece>
+    <BlocPiece>
+     <InfoPce>
+      <IdPce V="832"/>
+      <TypPce V="01"/>
+      <NatPce V="01"/>
+
+      <Obj V="TEST HOMOLOGATION"/>
+     </InfoPce>
+    </BlocPiece>
+    <LigneDePiece>
+     <BlocLignePiece>
+      <InfoLignePce>
+       <IdLigne V="1"/>
+       <Nature V="6553"/>
+       <Fonction V="113"/>
+
+       <LibVir1 V="ECHEANCIER"/>
+       <LibVir2 V="LE NUMERO N EST PAS PRECISE"/>
+       <ModRegl V="03"/>
+       <TVAIntraCom V="0"/>
+       <MtHT V="39724.75"/>
+      </InfoLignePce>
+     </BlocLignePiece>
+     <Tiers>
+      <InfoTiers>
+
+       <RefTiers V="811"/>
+       <CatTiers V="22"/>
+       <NatJur V="09"/>
+       <Nom V="PAIERIE DEPART. HERAULT"/>
+      </InfoTiers>
+      <Adresse>
+       <TypAdr V="1"/>
+       <Adr2 V="1000 RUE ALCO"/>
+       <CP V="34000"/>
+
+       <Ville V="MONTPELLIER"/>
+       <CodRes V="0"/>
+      </Adresse>
+      <CpteBancaire>
+       <CodeEtab V="30001"/>
+       <CodeGuic V="00866"/>
+       <IdCpte V="C7850000000"/>
+       <CleRib V="67"/>
+       <LibBanc V="LA BANQUE DU FUTUR"/>
+
+       <TitCpte V="PAIERIE DEPART. HERAULT"/>
+      </CpteBancaire>
+     </Tiers>
+    </LigneDePiece>
+   </Piece>
+  </Bordereau>
+  	
+ </PES_DepenseAller>
+ <PES_PJ>
+  <EnTetePES_PJ>
+
+   <IdVer V="1"/>
+  </EnTetePES_PJ>
+ </PES_PJ>
+</n:PES_Aller>
diff --git a/test/PHPUnit/lib/fixtures/HELIOS_SIMU_ALR2_NoCodColl.xml b/test/PHPUnit/lib/fixtures/HELIOS_SIMU_ALR2_NoCodColl.xml
new file mode 100644
index 0000000000000000000000000000000000000000..0e02c736e01074d671b19eefb07d658a69674b5c
--- /dev/null
+++ b/test/PHPUnit/lib/fixtures/HELIOS_SIMU_ALR2_NoCodColl.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<n:PES_Aller xmlns:n="http://www.minefi.gouv.fr/cp/helios/pes_v2/Rev0/aller"
+             xmlns:acta="http://www.minefi.gouv.fr/cp/helios/pes_v2/etatactif/r0/aller"
+             xmlns:buda="http://www.minefi.gouv.fr/cp/helios/pes_v2/budget/r0/aller"
+             xmlns:cm="http://www.minefi.gouv.fr/cp/helios/pes_v2/commun"
+             xmlns:depa="http://www.minefi.gouv.fr/cp/helios/pes_v2/depense/r0/aller"
+             xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:empa="http://www.minefi.gouv.fr/cp/helios/pes_v2/emprunt/r0/aller" xmlns:mara="http://www.minefi.gouv.fr/cp/helios/pes_v2/marche/r0/aller" xmlns:reca="http://www.minefi.gouv.fr/cp/helios/pes_v2/recette/r0/aller" xmlns:rola="http://www.minefi.gouv.fr/cp/helios/pes_v2/role/r0/aller" xmlns:xad="http://uri.etsi.org/01903/v1.1.1#" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Id="ID1551477369">
+ <Enveloppe>
+  <Parametres>
+   <Version V="1"/>
+   <TypFic V="PESALR2"/>
+   <NomFic V="HELIOS_SIMU_ALR2_1444811220_681372666.xml"/>
+  </Parametres>
+  <Emetteur>
+   <Sigle V="EMSIGLE"/>
+
+   <Adresse V="EMADRESSE"/>
+  </Emetteur>
+  <Recepteur>
+   <Sigle V="HELIOS"/>
+   <Adresse V="READRESSE"/>
+  </Recepteur>
+ </Enveloppe>
+ <EnTetePES>
+  <DteStr V="2015-10-14"/>
+
+  <IdPost V="034000"/>
+  <IdColl V="12345678912345"/>
+  <CodBud V="12"/>
+  <LibelleColBud V="COMMUNE"/>
+ </EnTetePES>
+ <PES_DepenseAller>
+  <EnTeteDepense>
+   <IdVer V="1"/>
+
+   <InfoDematerialisee V="0"/>
+  </EnTeteDepense>
+  <Bordereau Id="BORD262484">
+   <BlocBordereau>
+    <Exer V="2009"/>
+    <IdBord V="1234567"/>
+    <DteBordEm V="2009-07-16"/>
+    <TypBord V="01"/>
+    <NbrPce V="1"/>
+
+    <MtCumulAnnuel V="6312190.16"/>
+    <MtBordHT V="75724.75"/>
+   </BlocBordereau>
+   <Piece>
+    <BlocPiece>
+     <InfoPce>
+      <IdPce V="832"/>
+      <TypPce V="01"/>
+      <NatPce V="01"/>
+
+      <Obj V="TEST HOMOLOGATION"/>
+     </InfoPce>
+    </BlocPiece>
+    <LigneDePiece>
+     <BlocLignePiece>
+      <InfoLignePce>
+       <IdLigne V="1"/>
+       <Nature V="6553"/>
+       <Fonction V="113"/>
+
+       <LibVir1 V="ECHEANCIER"/>
+       <LibVir2 V="LE NUMERO N EST PAS PRECISE"/>
+       <ModRegl V="03"/>
+       <TVAIntraCom V="0"/>
+       <MtHT V="39724.75"/>
+      </InfoLignePce>
+     </BlocLignePiece>
+     <Tiers>
+      <InfoTiers>
+
+       <RefTiers V="811"/>
+       <CatTiers V="22"/>
+       <NatJur V="09"/>
+       <Nom V="PAIERIE DEPART. HERAULT"/>
+      </InfoTiers>
+      <Adresse>
+       <TypAdr V="1"/>
+       <Adr2 V="1000 RUE ALCO"/>
+       <CP V="34000"/>
+
+       <Ville V="MONTPELLIER"/>
+       <CodRes V="0"/>
+      </Adresse>
+      <CpteBancaire>
+       <CodeEtab V="30001"/>
+       <CodeGuic V="00866"/>
+       <IdCpte V="C7850000000"/>
+       <CleRib V="67"/>
+       <LibBanc V="LA BANQUE DU FUTUR"/>
+
+       <TitCpte V="PAIERIE DEPART. HERAULT"/>
+      </CpteBancaire>
+     </Tiers>
+    </LigneDePiece>
+   </Piece>
+  </Bordereau>
+  	
+ </PES_DepenseAller>
+ <PES_PJ>
+  <EnTetePES_PJ>
+
+   <IdVer V="1"/>
+  </EnTetePES_PJ>
+ </PES_PJ>
+</n:PES_Aller>
diff --git a/test/PHPUnit/lib/fixtures/HELIOS_SIMU_ALR2_NoIdPost.xml b/test/PHPUnit/lib/fixtures/HELIOS_SIMU_ALR2_NoIdPost.xml
new file mode 100644
index 0000000000000000000000000000000000000000..96305d57ecb9be000b76a7db43ae99a7875ba14d
--- /dev/null
+++ b/test/PHPUnit/lib/fixtures/HELIOS_SIMU_ALR2_NoIdPost.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<n:PES_Aller xmlns:n="http://www.minefi.gouv.fr/cp/helios/pes_v2/Rev0/aller"
+             xmlns:acta="http://www.minefi.gouv.fr/cp/helios/pes_v2/etatactif/r0/aller"
+             xmlns:buda="http://www.minefi.gouv.fr/cp/helios/pes_v2/budget/r0/aller"
+             xmlns:cm="http://www.minefi.gouv.fr/cp/helios/pes_v2/commun"
+             xmlns:depa="http://www.minefi.gouv.fr/cp/helios/pes_v2/depense/r0/aller"
+             xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:empa="http://www.minefi.gouv.fr/cp/helios/pes_v2/emprunt/r0/aller" xmlns:mara="http://www.minefi.gouv.fr/cp/helios/pes_v2/marche/r0/aller" xmlns:reca="http://www.minefi.gouv.fr/cp/helios/pes_v2/recette/r0/aller" xmlns:rola="http://www.minefi.gouv.fr/cp/helios/pes_v2/role/r0/aller" xmlns:xad="http://uri.etsi.org/01903/v1.1.1#" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Id="ID1551477369">
+ <Enveloppe>
+  <Parametres>
+   <Version V="1"/>
+   <TypFic V="PESALR2"/>
+   <NomFic V="HELIOS_SIMU_ALR2_1444811220_681372666.xml"/>
+  </Parametres>
+  <Emetteur>
+   <Sigle V="EMSIGLE"/>
+
+   <Adresse V="EMADRESSE"/>
+  </Emetteur>
+  <Recepteur>
+   <Sigle V="HELIOS"/>
+   <Adresse V="READRESSE"/>
+  </Recepteur>
+ </Enveloppe>
+ <EnTetePES>
+  <DteStr V="2015-10-14"/>
+
+  <IdColl V="12345678912345"/>
+  <CodCol V="123"/>
+  <CodBud V="12"/>
+  <LibelleColBud V="COMMUNE"/>
+ </EnTetePES>
+ <PES_DepenseAller>
+  <EnTeteDepense>
+   <IdVer V="1"/>
+
+   <InfoDematerialisee V="0"/>
+  </EnTeteDepense>
+  <Bordereau Id="BORD262484">
+   <BlocBordereau>
+    <Exer V="2009"/>
+    <IdBord V="1234567"/>
+    <DteBordEm V="2009-07-16"/>
+    <TypBord V="01"/>
+    <NbrPce V="1"/>
+
+    <MtCumulAnnuel V="6312190.16"/>
+    <MtBordHT V="75724.75"/>
+   </BlocBordereau>
+   <Piece>
+    <BlocPiece>
+     <InfoPce>
+      <IdPce V="832"/>
+      <TypPce V="01"/>
+      <NatPce V="01"/>
+
+      <Obj V="TEST HOMOLOGATION"/>
+     </InfoPce>
+    </BlocPiece>
+    <LigneDePiece>
+     <BlocLignePiece>
+      <InfoLignePce>
+       <IdLigne V="1"/>
+       <Nature V="6553"/>
+       <Fonction V="113"/>
+
+       <LibVir1 V="ECHEANCIER"/>
+       <LibVir2 V="LE NUMERO N EST PAS PRECISE"/>
+       <ModRegl V="03"/>
+       <TVAIntraCom V="0"/>
+       <MtHT V="39724.75"/>
+      </InfoLignePce>
+     </BlocLignePiece>
+     <Tiers>
+      <InfoTiers>
+
+       <RefTiers V="811"/>
+       <CatTiers V="22"/>
+       <NatJur V="09"/>
+       <Nom V="PAIERIE DEPART. HERAULT"/>
+      </InfoTiers>
+      <Adresse>
+       <TypAdr V="1"/>
+       <Adr2 V="1000 RUE ALCO"/>
+       <CP V="34000"/>
+
+       <Ville V="MONTPELLIER"/>
+       <CodRes V="0"/>
+      </Adresse>
+      <CpteBancaire>
+       <CodeEtab V="30001"/>
+       <CodeGuic V="00866"/>
+       <IdCpte V="C7850000000"/>
+       <CleRib V="67"/>
+       <LibBanc V="LA BANQUE DU FUTUR"/>
+
+       <TitCpte V="PAIERIE DEPART. HERAULT"/>
+      </CpteBancaire>
+     </Tiers>
+    </LigneDePiece>
+   </Piece>
+  </Bordereau>
+  	
+ </PES_DepenseAller>
+ <PES_PJ>
+  <EnTetePES_PJ>
+
+   <IdVer V="1"/>
+  </EnTetePES_PJ>
+ </PES_PJ>
+</n:PES_Aller>
diff --git a/test/PHPUnit/lib/fixtures/NoEnTete.xml b/test/PHPUnit/lib/fixtures/NoEnTete.xml
new file mode 100644
index 0000000000000000000000000000000000000000..3dd2b48d6ffb1dde020f6f588ea5521360cf6ca0
--- /dev/null
+++ b/test/PHPUnit/lib/fixtures/NoEnTete.xml
@@ -0,0 +1,2 @@
+<stuff>
+</stuff>
\ No newline at end of file
diff --git a/test/PHPUnit/lib/fixtures/PES_ACQUIT_RETOUR.xml b/test/PHPUnit/lib/fixtures/PES_ACQUIT_RETOUR.xml
new file mode 100644
index 0000000000000000000000000000000000000000..6d2f180f3b198cf0e95d96735fa16113955fbcc6
--- /dev/null
+++ b/test/PHPUnit/lib/fixtures/PES_ACQUIT_RETOUR.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<n:PES_ACQUIT_RETOUR xmlns:n="http://www.minefi.gouv.fr/cp/helios/pes_v2/Rev0/aller/ack">
+    <Enveloppe>
+        <Parametres>
+            <Version V="1"/>
+            <TypFic V="PES2R_DEP"/>
+            <NomFic V="PES2R_DEP_P_000_00_000000_00000000_2025010107_20250101010000.xml"/>
+        </Parametres>
+    </Enveloppe>
+    <EnTetePES>
+        <DteStr V="2025-01-01"/>
+        <IdPost V="123456"/>
+        <LibellePoste V="UNDEPARTEMENT"/>
+        <IdColl V="49101169800033"/>
+        <CodColl V="007"/>
+        <CodBud V="12"/>
+        <LibelleColBud V="LIBELLECODBUD"/>
+    </EnTetePES>
+    <ACQUIT_RETOUR>
+        <EnTeteAcquit_Retour>
+            <IdVer V="2"/>
+        </EnTeteAcquit_Retour>
+        <ElementACQUIT_RETOUR>
+            <DomaineAckRetour V="13"/>
+            <NomFichierRetour V="PES2R_DEP_P_710_20_044090_20250307_20250307_20250308182309.xml"/>
+            <TypRestit V="02"/>
+            <DateAcquit V="2025-03-10"/>
+        </ElementACQUIT_RETOUR>
+    </ACQUIT_RETOUR>
+</n:PES_ACQUIT_RETOUR>
\ No newline at end of file
diff --git a/tests/Controller/HeliosAdminControllerTest.php b/tests/Controller/HeliosAdminControllerTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..d39ad0e11a3d63bc8a0790569edc8a8a2a641d6c
--- /dev/null
+++ b/tests/Controller/HeliosAdminControllerTest.php
@@ -0,0 +1,128 @@
+<?php
+
+declare(strict_types=1);
+
+namespace S2low\Tests\Controller;
+
+use Exception;
+use PHPUnit\Framework\MockObject\MockObject;
+use PHPUnit\Framework\TestCase;
+use S2low\Controller\HeliosAdminController;
+use S2low\Services\MailActesNotifications\MailerSymfony;
+use S2low\Services\MailActesNotifications\MailerSymfonyFactory;
+use S2lowLegacy\Class\Connexion;
+use S2lowLegacy\Class\InitData;
+use S2lowLegacy\Class\Initialisation;
+use S2lowLegacy\Class\User;
+use S2lowLegacy\Lib\HeliosNamesGenerator;
+use S2lowLegacy\Model\HeliosTransactionsSQL;
+
+class HeliosAdminControllerTest extends TestCase
+{
+    private MockObject|HeliosTransactionsSQL $heliosTransactionsSQLMock;
+    private HeliosAdminController $heliosAdminController;
+    private MockObject|MailerSymfony $mailerSymfony;
+
+    public function __construct(?string $name = null, array $data = [], $dataName = '')
+    {
+        parent::__construct($name, $data, $dataName);
+        $this->heliosTransactionsSQLMock = $this->getMockBuilder(HeliosTransactionsSQL::class)->disableOriginalConstructor()->getMock();
+
+        $mailerSymfonyFactoryMock = $this->getMockBuilder(MailerSymfonyFactory::class)->disableOriginalConstructor()->getMock();
+        $this->mailerSymfony = $this->getMockBuilder(MailerSymfony::class)->disableOriginalConstructor()->getMock();
+        $mailerSymfonyFactoryMock->method('getInstance')->willReturn($this->mailerSymfony);
+
+        $initData = new InitData(
+            $this->getMockBuilder(Connexion::class)->disableOriginalConstructor()->getMock(),
+            $this->getMockBuilder(User::class)->disableOriginalConstructor()->getMock(),
+            ['role' => 'SADM','email' => 'em@a.il'],
+            [],
+            []
+        );
+
+        $initialisationMock = $this->getMockBuilder(Initialisation::class)->disableOriginalConstructor()->getMock();
+        $initialisationMock->method('doInit')->willReturn($initData);
+
+        $this->heliosAdminController = new HeliosAdminController(
+            $this->heliosTransactionsSQLMock,
+            $mailerSymfonyFactoryMock,
+            'pAppli',
+            $initialisationMock,
+            new HeliosNamesGenerator()
+        );
+    }
+
+    /**
+     * @throws Exception
+     */
+    public function testAucuneTransaction(): void
+    {
+        $this->heliosTransactionsSQLMock->method('getNonAcquitteWithPasstransStatus')
+            ->willReturnOnConsecutiveCalls([], []);
+
+        $this->mailerSymfony->expects(static::once())->method('sendMail')
+            ->with('Aucune transaction n est reste en transmis');
+
+        $this->heliosAdminController->transmisNonAcquitteParMail();
+    }
+
+    /**
+     * @throws Exception
+     */
+    public function testTransactionGateway(): void
+    {
+        $this->heliosTransactionsSQLMock->method('getNonAcquitteWithPasstransStatus')
+            ->willReturnOnConsecutiveCalls([
+                [
+                    'id' => 1,
+                    'filename' => 'filename',
+                    'xml_nomfic' => 'xml_nomfic',
+                    'submission_date' => '01-01-2001',
+                    'helios_ftp_dest' => 'helios_ftp_dest',
+                    'xml_id_post' => 'xml_id_post',
+                    'xml_cod_bud' => 'xml_cod_bud',
+                    'xml_cod_col' => 'xml_cod_col',
+                    'sha1' => 'sha1'
+                ]
+            ], []);
+
+        $this->mailerSymfony->expects(static::once())->method('sendMail')
+            ->with(
+                '1 transactions sont restees a l\'etat transmis.',
+                'Gateway 
+xml_nomfic,01-01-2001,helios_ftp_dest,xml_id_post,xml_cod_bud,xml_cod_col
+Passtrans 
+'
+            );
+        $this->heliosAdminController->transmisNonAcquitteParMail();
+    }
+
+    /**
+     * @throws Exception
+     */
+    public function testTransactionPasstrans(): void
+    {
+        $this->heliosTransactionsSQLMock->method('getNonAcquitteWithPasstransStatus')
+            ->willReturnOnConsecutiveCalls([], [[
+                'id' => 1,
+                'filename' => 'filename',
+                'xml_nomfic' => 'xml_nomfic',
+                'submission_date' => '01-01-2001',
+                'helios_ftp_dest' => 'helios_ftp_dest',
+                'xml_id_post' => 'xml_id_post',
+                'xml_cod_bud' => 'xml_cod_bud',
+                'xml_cod_col' => 'xml_cod_col',
+                'sha1' => 'sha1'
+            ]]);
+
+        $this->mailerSymfony->expects(static::once())->method('sendMail')
+            ->with(
+                '1 transactions sont restees a l\'etat transmis.',
+                'Gateway 
+Passtrans 
+xml_nomfic,01-01-2001,helios_ftp_dest,xml_id_post,xml_cod_bud,xml_cod_col,sha1,helios_ftp_dest%%pAppli%%PES#xml_cod_col#xml_id_post#xml_cod_bud%%sha1
+'
+            );
+        $this->heliosAdminController->transmisNonAcquitteParMail();
+    }
+}
diff --git a/tests/Services/Helios/HeliosEnvoiControlerTest.php b/tests/Services/Helios/HeliosEnvoiControlerTest.php
index 5ef91a38db7eb73290bf520c337d6d5e447bded2..c54db60be53721fad3008abd88e5000c1e040678 100644
--- a/tests/Services/Helios/HeliosEnvoiControlerTest.php
+++ b/tests/Services/Helios/HeliosEnvoiControlerTest.php
@@ -1,5 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
+namespace S2low\Tests\Services\Helios;
+
+use Exception;
+use PHPUnit\Framework\MockObject\MockObject;
 use S2low\Services\Helios\DGFiPConnection\DGFiPConnection;
 use S2low\Services\Helios\DGFiPConnection\DGFiPConnectionBuilder;
 use S2low\Services\Helios\DGFiPConnection\DGFiPConnectionConfiguration;
@@ -7,29 +13,49 @@ use S2low\Services\Helios\DGFiPConnection\DGFiPConnectionMode;
 use S2low\Services\Helios\DGFiPConnection\DGFiPConnectionsManager;
 use S2low\Services\Helios\HeliosEnvoiControler;
 use S2low\Services\MailActesNotifications\MailerSymfonyFactory;
+use S2low\Tests\S2lowSymfonyWebTestCase;
 use S2lowLegacy\Class\Antivirus;
 use S2lowLegacy\Class\helios\FichierCompteur;
+use S2lowLegacy\Class\helios\HeliosStatusSQL;
+use S2lowLegacy\Class\helios\HeliosTransmissionWindowsSQL;
 use S2lowLegacy\Class\helios\PesAllerRetriever;
 use S2lowLegacy\Class\S2lowLogger;
 use S2lowLegacy\Class\TmpFolder;
+use S2lowLegacy\Class\VerifyPemCertificateFactory;
+use S2lowLegacy\Class\WorkerScript;
 use S2lowLegacy\Controller\HeliosController;
-use S2lowLegacy\Lib\SQLQuery;
+use S2lowLegacy\Lib\HeliosNamesGenerator;
+use S2lowLegacy\Lib\PesAllerReader;
 use S2lowLegacy\Model\AuthoritySiretSQL;
 use S2lowLegacy\Model\AuthoritySQL;
 use S2lowLegacy\Model\HeliosTransactionsSQL;
 
-class HeliosEnvoiControlerTest extends \S2low\Tests\S2lowSymfonyWebTestCase
+class HeliosEnvoiControlerTest extends S2lowSymfonyWebTestCase
 {
-    private $testStreamUrl;
-
-    /** @var  HeliosController */
-    private $heliosController;
-
-    /** @var  HeliosEnvoiControler */
-    private $heliosEnvoiControler;
-
-    /** @var  TmpFolder */
-    private $tmpFolder;
+    private string $testStreamUrl;
+    private string $counterDir;
+    private HeliosController $heliosController;
+    private HeliosEnvoiControler $envoiControler;
+    private TmpFolder $tmpFolder;
+    private MockObject|WorkerScript $workerScript;
+    private DGFiPConnectionBuilder|MockObject $connectBuilder;
+    private AuthoritySQL $authoritySQL;
+
+    private AuthoritySiretSQL $authoritySiretSQL;
+    private HeliosTransactionsSQL $transactionsSQL;
+
+    public function __construct()
+    {
+        parent::__construct();
+        $this->tmpFolder = new TmpFolder();
+        $this->workerScript = $this->getMockBuilder(WorkerScript::class)
+            ->disableOriginalConstructor()->getMock();
+        $this->connectBuilder = $this->getMockBuilder(DGFiPConnectionBuilder::class)
+            ->disableOriginalConstructor()->getMock();
+        $this->authoritySQL = static::getContainer()->get(AuthoritySQL::class);
+        $this->authoritySiretSQL = static::getContainer()->get(AuthoritySiretSQL::class);
+        $this->transactionsSQL = static::getContainer()->get(HeliosTransactionsSQL::class);
+    }
 
     /**
      * @throws Exception
@@ -38,60 +64,60 @@ class HeliosEnvoiControlerTest extends \S2low\Tests\S2lowSymfonyWebTestCase
     {
         parent::setUp();
 
-        $this->tmpFolder = new TmpFolder();
         $this->testStreamUrl = $this->tmpFolder->create();
-
         $this->counterDir = $this->tmpFolder->create();
-        $counterFile = fopen($this->counterDir . "/counter.txt", "w");
-        fwrite($counterFile, "000");
-
-        $this->workerScript = $this->getMockBuilder(\S2lowLegacy\Class\WorkerScript::class)
-            ->disableOriginalConstructor()->getMock();
-        $this->dgfipConnectionBuilderMock = $this->getMockBuilder(DGFiPConnectionBuilder::class)
-            ->disableOriginalConstructor()->getMock();
+        $counterFile = fopen($this->counterDir . '/counter.txt', 'w');
+        fwrite($counterFile, '000');
 
-        mkdir($this->testStreamUrl . "/helios");
-        $this->getObjectInstancier()->set("helios_files_upload_root", $this->testStreamUrl . "/helios/");
+        mkdir($this->testStreamUrl . '/helios');
+        $this->getObjectInstancier()->set('helios_files_upload_root', $this->testStreamUrl . '/helios/');
         $this->heliosController = new HeliosController($this->getObjectInstancier());
-        $this->heliosEnvoiControler = new HeliosEnvoiControler(
-            $this->getContainer()->get(SQLQuery::class),
-            $this->getContainer()->get(PesAllerRetriever::class),
-            $this->getContainer()->get(Antivirus::class),
+        $this->envoiControler = new HeliosEnvoiControler(
+            static::getContainer()->get(AuthoritySiretSQL::class),
+            static::getContainer()->get(HeliosTransactionsSQL::class),
+            static::getContainer()->get(AuthoritySQL::class),
+            static::getContainer()->get(HeliosTransmissionWindowsSQL::class),
+            static::getContainer()->get(PesAllerRetriever::class),
+            static::getContainer()->get(Antivirus::class),
             $this->workerScript,
-            $this->getContainer()->get(MailerSymfonyFactory::class),
+            static::getContainer()->get(MailerSymfonyFactory::class),
             new DGFiPConnectionsManager(
                 new DGFiPConnectionConfiguration(   //Passtrans Connection
-                    "passtrans_server",
+                    'passtrans_server',
                     1982,
-                    "passtrans_login",
-                    "passtrans_password",
+                    'passtrans_login',
+                    'passtrans_password',
                     DGFiPConnectionMode::PASSTRANS_SFTP,
                     true,
-                    "passtrans_sending_destination",
-                    "passtrans_response_server_path",
-                    "helios_ftp_p_appli"
+                    'passtrans_sending_destination',
+                    'passtrans_response_server_path',
+                    'helios_ftp_p_appli'
                 ),
                 new DGFiPConnectionConfiguration(   //Gateway Connection
-                    "std_server",
+                    'std_server',
                     1982,
-                    "std_login",
-                    "std_password",
+                    'std_login',
+                    'std_password',
                     DGFiPConnectionMode::GATEWAY,
                     true,
-                    "std_sending_destination",
-                    "std_response_server_path",
-                    "helios_ftp_p_appli"
+                    'std_sending_destination',
+                    'std_response_server_path',
+                    'helios_ftp_p_appli'
                 ),
-                $this->dgfipConnectionBuilderMock
+                $this->connectBuilder
             ),
             new FichierCompteur($this->counterDir . '/counter.txt'),
-            $this->getContainer()->get(S2lowLogger::class),
+            static::getContainer()->get(S2lowLogger::class),
+            new PesAllerReader(),
+            new HeliosNamesGenerator(),
+            new VerifyPemCertificateFactory()
         );
     }
 
     protected function tearDown(): void
     {
         $this->tmpFolder->delete($this->testStreamUrl);
+        $this->tmpFolder->delete($this->counterDir);
         parent::tearDown();
     }
 
@@ -100,22 +126,21 @@ class HeliosEnvoiControlerTest extends \S2low\Tests\S2lowSymfonyWebTestCase
      */
     public function testValidateAllTransactions()
     {
-        $this->validatePesAller("pes_aller_ok.xml");
-        $authoritySiret = new AuthoritySiretSQL($this->getSQLQuery());
-        $siret_list = $authoritySiret->siretList(1);
-        $this->assertEquals("12345678912345", $siret_list[0]['siret']);
+        $this->validatePesAller('pes_aller_ok.xml');
+        $siret_list = $this->authoritySiretSQL->siretList(1);
+        static::assertEquals('12345678912345', $siret_list[0]['siret']);
     }
 
     /**
      * @param $filename
-     * @return array|bool|mixed
+     * @return int
      * @throws Exception
      */
-    private function validatePesAller($filename)
+    private function validatePesAller($filename): int
     {
-        $id_t = $this->getImportFile($filename);
-        $this->validate($id_t);
-        return $id_t;
+        $id_transaction = $this->getImportFile($filename);
+        $this->validate($id_transaction);
+        return $id_transaction;
     }
 
     /**
@@ -123,26 +148,44 @@ class HeliosEnvoiControlerTest extends \S2low\Tests\S2lowSymfonyWebTestCase
      */
     public function testNotInIso8859()
     {
-        $this->workerScript->expects($this->never())->method('putJobByQueueName');
-        $id_t = $this->validatePesAller("pes_aller_utf8.xml");
-
-        $heliosTransaction = new HeliosTransactionsSQL($this->getSQLQuery());
-        $info = $heliosTransaction->getInfo($id_t);
-        $this->assertEquals(HeliosTransactionsSQL::ERREUR, $info['last_status_id']);
-        $last_status_info = $heliosTransaction->getLastStatusInfo($id_t);
-        $this->assertEquals("Transaction $id_t : ce fichier n'est pas encodé en ISO-8859-1", $last_status_info['message']);
+        $this->workerScript->expects(static::never())->method('putJobByQueueName');
+        $id_transaction = $this->validatePesAller('pes_aller_utf8.xml');
+
+        $info_transaction = $this->transactionsSQL->getInfo($id_transaction);
+        static::assertEquals(HeliosTransactionsSQL::ERREUR, $info_transaction['last_status_id']);
+        $last_status_info = $this->transactionsSQL->getLastStatusInfo($id_transaction);
+        static::assertEquals("Transaction $id_transaction : ce fichier n'est pas encodé en ISO-8859-1", $last_status_info['message']);
     }
 
-    public function testCodCollTropLong()
+    /**
+     * @throws Exception
+     */
+    public function testCodCollTropLong(): void
     {
-        $this->workerScript->expects($this->never())->method('putJobByQueueName');
-        $id_t = $this->validatePesAller("pes_aller_CodColTropLong.xml");
-
-        $heliosTransaction = new HeliosTransactionsSQL($this->getSQLQuery());
-        $info = $heliosTransaction->getInfo($id_t);
-        $this->assertEquals(HeliosTransactionsSQL::ERREUR, $info['last_status_id']);
-        $last_status_info = $heliosTransaction->getLastStatusInfo($id_t);
-        $this->assertEquals("Transaction $id_t : Le CodCol est trop long", $last_status_info['message']);
+        $this->workerScript->expects(static::never())->method('putJobByQueueName');
+        $id_transaction = $this->validatePesAller('pes_aller_CodColTropLong.xml');
+
+        $info_transaction = $this->transactionsSQL->getInfo($id_transaction);
+        static::assertEquals(HeliosTransactionsSQL::ERREUR, $info_transaction['last_status_id']);
+        $last_status_info = $this->transactionsSQL->getLastStatusInfo($id_transaction);
+        static::assertEquals("Transaction $id_transaction : Le CodCol est trop long", $last_status_info['message']);
+    }
+
+    /**
+     * @throws Exception
+     */
+    public function testPasDeNomFic()
+    {
+        $this->workerScript->expects(static::never())->method('putJobByQueueName');
+        $id_transaction = $this->validatePesAller('pes_aller_PasDeNomFic.xml');
+
+        $info_transaction = $this->transactionsSQL->getInfo($id_transaction);
+        static::assertEquals(HeliosTransactionsSQL::ERREUR, $info_transaction['last_status_id']);
+        $last_status_info = $this->transactionsSQL->getLastStatusInfo($id_transaction);
+        static::assertEquals(
+            "Transaction $id_transaction : La balise Enveloppe/Parametre/NomFic n'est pas présente ou est vide",
+            $last_status_info['message']
+        );
     }
 
     /**
@@ -150,17 +193,18 @@ class HeliosEnvoiControlerTest extends \S2low\Tests\S2lowSymfonyWebTestCase
      */
     public function testAccentNomFic()
     {
-        $this->workerScript->expects($this->once())->method('putJobByQueueName');
-        $id_t = $this->validatePesAller("PESALR2_accent_dans_nomfic.xml");
+        $this->workerScript->expects(static::once())->method('putJobByQueueName');
+        $id_transaction = $this->validatePesAller('PESALR2_accent_dans_nomfic.xml');
 
-        $heliosTransaction = new HeliosTransactionsSQL($this->getSQLQuery());
-        $info = $heliosTransaction->getInfo($id_t);
+        $info_transaction = $this->transactionsSQL->getInfo($id_transaction);
 
-        $this->assertEquals("PESALR220001861200016Trésorerie_de_M20141205152530.xml", $info['xml_nomfic']);
+        static::assertEquals(
+            'PESALR220001861200016Trésorerie_de_M20141205152530.xml',
+            $info_transaction['xml_nomfic']
+        );
 
-        $authoritySiret = new AuthoritySiretSQL($this->getSQLQuery());
-        $siret_list = $authoritySiret->siretList(1);
-        $this->assertEquals("12345678912345", $siret_list[0]['siret']);
+        $siret_list = $this->authoritySiretSQL->siretList(1);
+        static::assertEquals('12345678912345', $siret_list[0]['siret']);
     }
 
     /**
@@ -168,13 +212,12 @@ class HeliosEnvoiControlerTest extends \S2low\Tests\S2lowSymfonyWebTestCase
      */
     public function testRetrieveAllPesInfo()
     {
-        $id_t = $this->validatePesAller("pes_aller_ok.xml");
-        $heliosTransaction = new HeliosTransactionsSQL($this->getSQLQuery());
-        $info = $heliosTransaction->getInfo($id_t);
-        $this->assertEquals("03f432a4f6d35110bf309fb525eb61f7", $info['xml_nomfic']);
-        $this->assertEquals("123", $info['xml_cod_col']);
-        $this->assertEquals("12", $info['xml_cod_bud']);
-        $this->assertEquals("034000", $info['xml_id_post']);
+        $id_transaction = $this->validatePesAller('pes_aller_ok.xml');
+        $info_transaction = $this->transactionsSQL->getInfo($id_transaction);
+        static::assertEquals('03f432a4f6d35110bf309fb525eb61f7', $info_transaction['xml_nomfic']);
+        static::assertEquals('123', $info_transaction['xml_cod_col']);
+        static::assertEquals('12', $info_transaction['xml_cod_bud']);
+        static::assertEquals('034000', $info_transaction['xml_id_post']);
     }
 
     /**
@@ -182,56 +225,63 @@ class HeliosEnvoiControlerTest extends \S2low\Tests\S2lowSymfonyWebTestCase
      */
     public function testChangedPesAller()
     {
-        $this->workerScript->expects($this->never())->method('putJobByQueueName');
-        $pes_aller = __DIR__ . "/../../../test/PHPUnit/helios/fixtures/pes_aller_ok.xml";
-        copy($pes_aller, $this->testStreamUrl . "/helios/" . sha1_file($pes_aller));
-        $id_t = $this->heliosController->importFile(8, $pes_aller, "pes_aller.xml");
-        $pes_aller_change = __DIR__ . "/../../../test/PHPUnit/helios/fixtures/pes_aller.xml";
-        copy($pes_aller_change, $this->testStreamUrl . "/helios/" . sha1_file($pes_aller));
+        $this->workerScript->expects(static::never())->method('putJobByQueueName');
+        $pes_aller = __DIR__ . '/../../../test/PHPUnit/helios/fixtures/pes_aller_ok.xml';
+        copy($pes_aller, $this->testStreamUrl . '/helios/' . sha1_file($pes_aller));
+        $transaction_id = $this->heliosController->importFile(8, $pes_aller, 'pes_aller.xml');
+        $pes_aller_change = __DIR__ . '/../../../test/PHPUnit/helios/fixtures/pes_aller.xml';
+        copy($pes_aller_change, $this->testStreamUrl . '/helios/' . sha1_file($pes_aller));
         ob_start();
-        $this->heliosEnvoiControler->validateOneTransaction($id_t);
+        $this->envoiControler->validateOneTransaction($transaction_id);
         ob_end_clean();
 
-        $heliosTransaction = new HeliosTransactionsSQL($this->getSQLQuery());
-        $info = $heliosTransaction->getLastStatusInfo($id_t);
-        $this->assertEquals(-1, $info['status_id']);
-        $this->assertMatchesRegularExpression("#Le fichier a été modifé depuis son postage sur la plateforme#", $info['message']);
+        $info_transaction = $this->transactionsSQL->getLastStatusInfo($transaction_id);
+        static::assertEquals(-1, $info_transaction['status_id']);
+        static::assertMatchesRegularExpression(
+            '#Le fichier a été modifé depuis son postage sur la plateforme#',
+            $info_transaction['message']
+        );
     }
 
+    /**
+     * @throws Exception
+     */
     public function testSigneNoID()
     {
-        $id_t = $this->getImportFile("/../../class/fixtures/pes_no_id.xml");
-        $this->workerScript->expects($this->once())->method('putJobByQueueName')
-            ->with('helios-envoi', "$id_t");
-        $this->validate($id_t);
-        $heliosTransaction = new HeliosTransactionsSQL($this->getSQLQuery());
-        $info = $heliosTransaction->getLastStatusInfo($id_t);
-        $this->assertEquals(HeliosTransactionsSQL::ATTENTE, $info['status_id']);
-        $this->assertMatchesRegularExpression("#Transaction $id_t dans la file d'attente#", $info['message']);
+        $id_transaction = $this->getImportFile('/../../class/fixtures/pes_no_id.xml');
+        $this->workerScript->expects(static::once())->method('putJobByQueueName')
+            ->with('helios-envoi', "$id_transaction");
+        $this->validate($id_transaction);
+        $info_transaction = $this->transactionsSQL->getLastStatusInfo($id_transaction);
+        static::assertEquals(HeliosTransactionsSQL::ATTENTE, $info_transaction['status_id']);
+        static::assertMatchesRegularExpression("#Transaction $id_transaction dans la file d'attente#", $info_transaction['message']);
     }
 
+    /**
+     * @throws Exception
+     */
     public function testSigneNoIDPasstrans()
     {
-        $authoritySQL = new AuthoritySQL($this->getSQLQuery());
-        $authoritySQL->query("UPDATE authorities SET helios_use_passtrans = true WHERE id =1");
-        $id_t = $this->getImportFile("/../../class/fixtures/pes_no_id.xml");
-        $this->workerScript->expects($this->once())->method('putJobByQueueName')
-            ->with('helios-envoi-passtrans', "$id_t");
-        $this->validate($id_t);
-        $heliosTransaction = new HeliosTransactionsSQL($this->getSQLQuery());
-        $info = $heliosTransaction->getLastStatusInfo($id_t);
-        $this->assertEquals(HeliosTransactionsSQL::ATTENTE, $info['status_id']);
-        $this->assertMatchesRegularExpression("#Transaction $id_t dans la file d'attente#", $info['message']);
+        $this->authoritySQL->query('UPDATE authorities SET helios_use_passtrans = true WHERE id =1');
+        $id_transaction = $this->getImportFile('/../../class/fixtures/pes_no_id.xml');
+        $this->workerScript->expects(static::once())->method('putJobByQueueName')
+            ->with('helios-envoi-passtrans', "$id_transaction");
+        $this->validate($id_transaction);
+        $info_transaction = $this->transactionsSQL->getLastStatusInfo($id_transaction);
+        static::assertEquals(HeliosTransactionsSQL::ATTENTE, $info_transaction['status_id']);
+        static::assertMatchesRegularExpression("#Transaction $id_transaction dans la file d'attente#", $info_transaction['message']);
     }
 
+    /**
+     * @throws Exception
+     */
     public function testDejaSigneBadSignature()
     {
-        $this->workerScript->expects($this->never())->method('putJobByQueueName');
-        $id_t = $this->validatePesAller("/../../lib/fixtures/HELIOS_SIMU_ALR2_bad_signature.xml");
-        $heliosTransaction = new HeliosTransactionsSQL($this->getSQLQuery());
-        $info = $heliosTransaction->getLastStatusInfo($id_t);
-        $this->assertEquals(-1, $info['status_id']);
-        $this->assertMatchesRegularExpression("#La signature du fichier est invalide#", $info['message']);
+        $this->workerScript->expects(static::never())->method('putJobByQueueName');
+        $id_transaction = $this->validatePesAller('/../../lib/fixtures/HELIOS_SIMU_ALR2_bad_signature.xml');
+        $info_transaction = $this->transactionsSQL->getLastStatusInfo($id_transaction);
+        static::assertEquals(HeliosStatusSQL::ERREUR, $info_transaction['status_id']);
+        static::assertMatchesRegularExpression('#La signature du fichier est invalide#', $info_transaction['message']);
     }
 
     /**
@@ -245,15 +295,14 @@ class HeliosEnvoiControlerTest extends \S2low\Tests\S2lowSymfonyWebTestCase
     /**
      * @throws Exception
      */
-    private function sendSamePESAllerFailed()
+    private function sendSamePESAllerFailed(): void
     {
-        $this->validatePesAller("pes_aller_ok.xml");
-        $id_t = $this->validatePesAller("pes_aller_ok.xml");
-        $heliosTransaction = new HeliosTransactionsSQL($this->getSQLQuery());
+        $this->validatePesAller('pes_aller_ok.xml');
+        $id_transaction = $this->validatePesAller('pes_aller_ok.xml');
 
-        $info = $heliosTransaction->getLastStatusInfo($id_t);
-        $this->assertEquals(-1, $info['status_id']);
-        $this->assertMatchesRegularExpression("#ce fichier existe déjà sur la plateforme#", $info['message']);
+        $info_transaction = $this->transactionsSQL->getLastStatusInfo($id_transaction);
+        static::assertEquals(-1, $info_transaction['status_id']);
+        static::assertMatchesRegularExpression('#ce fichier existe déjà sur la plateforme#', $info_transaction['message']);
     }
 
 
@@ -262,15 +311,13 @@ class HeliosEnvoiControlerTest extends \S2low\Tests\S2lowSymfonyWebTestCase
      */
     public function testSendSamePESAllerDoNotVerify()
     {
-        $this->workerScript->expects($this->exactly(2))->method('putJobByQueueName');
-        $this->heliosEnvoiControler->setDoNotVerifyNomFicUnicity(true);
-        $authoritySQL = new AuthoritySQL($this->getSQLQuery());
-        $authoritySQL->updateDoNotVerifyNomFicUnicity(1, true);
-        $this->validatePesAller("pes_aller_ok.xml");
-        $id_t = $this->validatePesAller("pes_aller_ok.xml");
-        $heliosTransaction = new HeliosTransactionsSQL($this->getSQLQuery());
-        $info = $heliosTransaction->getLastStatusInfo($id_t);
-        $this->assertEquals(2, $info['status_id']);
+        $this->workerScript->expects(static::exactly(2))->method('putJobByQueueName');
+        $this->envoiControler->setDoNotVerifyNomFicUnicity(true);
+        $this->authoritySQL->updateDoNotVerifyNomFicUnicity(1, true);
+        $this->validatePesAller('pes_aller_ok.xml');
+        $id_transaction = $this->validatePesAller('pes_aller_ok.xml');
+        $info_transaction = $this->transactionsSQL->getLastStatusInfo($id_transaction);
+        static::assertEquals(2, $info_transaction['status_id']);
     }
 
     /**
@@ -278,7 +325,7 @@ class HeliosEnvoiControlerTest extends \S2low\Tests\S2lowSymfonyWebTestCase
      */
     public function testSendSamePESAllerDoNotVerifyOnlyConst()
     {
-        $this->heliosEnvoiControler->setDoNotVerifyNomFicUnicity(true);
+        $this->envoiControler->setDoNotVerifyNomFicUnicity(true);
         $this->sendSamePESAllerFailed();
     }
 
@@ -287,8 +334,7 @@ class HeliosEnvoiControlerTest extends \S2low\Tests\S2lowSymfonyWebTestCase
      */
     public function testSendSamePESAllerDoNotVerifyOnlyAuthority()
     {
-        $authoritySQL = new AuthoritySQL($this->getSQLQuery());
-        $authoritySQL->updateDoNotVerifyNomFicUnicity(1, true);
+        $this->authoritySQL->updateDoNotVerifyNomFicUnicity(1, true);
         $this->sendSamePESAllerFailed();
     }
 
@@ -297,23 +343,25 @@ class HeliosEnvoiControlerTest extends \S2low\Tests\S2lowSymfonyWebTestCase
      */
     public function testWhenPESAllerIsEmpty()
     {
-        $this->workerScript->expects($this->never())->method('putJobByQueueName');
-        $id_t = $this->validatePesAller("pes_aller_empty.xml");
-        $heliosTransaction = new HeliosTransactionsSQL($this->getSQLQuery());
-        $info = $heliosTransaction->getInfo($id_t);
-        $this->assertEquals(-1, $info['last_status_id']);
-        $last_status_info = $heliosTransaction->getLastStatusInfo($id_t);
-        $this->assertEquals(
-            "Transaction $id_t : ce fichier ne contient ni bordereau, ni PJ, ni marché",
+        $this->workerScript->expects(static::never())->method('putJobByQueueName');
+        $id_transaction = $this->validatePesAller('pes_aller_empty.xml');
+        $info_transaction = $this->transactionsSQL->getInfo($id_transaction);
+        static::assertEquals(-1, $info_transaction['last_status_id']);
+        $last_status_info = $this->transactionsSQL->getLastStatusInfo($id_transaction);
+        static::assertEquals(
+            "Transaction $id_transaction : ce fichier ne contient ni bordereau, ni PJ, ni marché",
             $last_status_info['message']
         );
     }
 
+    /**
+     * @throws Exception
+     */
     private function createPesAllerToSend($filename)
     {
-        $id_t = $this->getImportFile($filename);
-        $this->validate($id_t);
-        return $id_t;
+        $id_transaction = $this->getImportFile($filename);
+        $this->validate($id_transaction);
+        return $id_transaction;
     }
 
     /**
@@ -321,22 +369,22 @@ class HeliosEnvoiControlerTest extends \S2low\Tests\S2lowSymfonyWebTestCase
      * 1/ elle se retrouve en erreur
      * 2/ l'envoi ne se fait pas ( dgfipConnectionBuilderMock non appelé )
      * @return void
+     * @throws Exception
      */
     public function testSendOneTransactionMauvaiseFilePasstrans()
     {
-        $this->dgfipConnectionBuilderMock->expects($this->never())->method('get');
+        $this->connectBuilder->expects(static::never())->method('get');
 
-        $id_t = $this->createPesAllerToSend("pes_aller_ok.xml");
+        $id_transaction = $this->createPesAllerToSend('pes_aller_ok.xml');
         ob_start();
-        $this->heliosEnvoiControler->sendOneTransaction($id_t, true);
+        $this->envoiControler->sendOneTransaction($id_transaction, true);
         ob_end_clean();
-        $heliosTransaction = new HeliosTransactionsSQL($this->getSQLQuery());
-        $info = $heliosTransaction->getInfo($id_t);
-        $this->assertEquals(HeliosTransactionsSQL::ERREUR, $info['last_status_id']);
-        $last_status_info = $heliosTransaction->getLastStatusInfo($id_t);
+        $info_transaction = $this->transactionsSQL->getInfo($id_transaction);
+        static::assertEquals(HeliosTransactionsSQL::ERREUR, $info_transaction['last_status_id']);
+        $last_status_info = $this->transactionsSQL->getLastStatusInfo($id_transaction);
 
-        $this->assertEquals(
-            "Transaction $id_t : la transaction a été aiguillée sur la mauvaise file passtrans",
+        static::assertEquals(
+            "Transaction $id_transaction : la transaction a été aiguillée sur la mauvaise file passtrans",
             $last_status_info['message']
         );
     }
@@ -346,25 +394,24 @@ class HeliosEnvoiControlerTest extends \S2low\Tests\S2lowSymfonyWebTestCase
      * 1/ elle se retrouve en erreur aussi
      * 2/ l'envoi ne se fait pas ( dgfipConnectionBuilderMock non appelé )
      * @return void
+     * @throws Exception
      */
     public function testSendOneTransactionMauvaiseFilePasstrans2()
     {
-        $this->dgfipConnectionBuilderMock->expects($this->never())->method('get');
+        $this->connectBuilder->expects(static::never())->method('get');
 
-        $authoritySQL = new AuthoritySQL($this->getSQLQuery());
-        $authoritySQL->query("UPDATE authorities SET helios_use_passtrans = true WHERE id =1");
+        $this->authoritySQL->query('UPDATE authorities SET helios_use_passtrans = true WHERE id =1');
 
-        $id_t = $this->createPesAllerToSend("pes_aller_ok.xml");
+        $id_transaction = $this->createPesAllerToSend('pes_aller_ok.xml');
         ob_start();
-        $this->heliosEnvoiControler->sendOneTransaction($id_t, false);
+        $this->envoiControler->sendOneTransaction($id_transaction, false);
         ob_end_clean();
-        $heliosTransaction = new HeliosTransactionsSQL($this->getSQLQuery());
-        $info = $heliosTransaction->getInfo($id_t);
-        $this->assertEquals(HeliosTransactionsSQL::ERREUR, $info['last_status_id']);
-        $last_status_info = $heliosTransaction->getLastStatusInfo($id_t);
+        $info_transaction = $this->transactionsSQL->getInfo($id_transaction);
+        static::assertEquals(HeliosTransactionsSQL::ERREUR, $info_transaction['last_status_id']);
+        $last_status_info = $this->transactionsSQL->getLastStatusInfo($id_transaction);
 
-        $this->assertEquals(
-            "Transaction $id_t : la transaction a été aiguillée sur la mauvaise file passtrans",
+        static::assertEquals(
+            "Transaction $id_transaction : la transaction a été aiguillée sur la mauvaise file passtrans",
             $last_status_info['message']
         );
     }
@@ -376,15 +423,16 @@ class HeliosEnvoiControlerTest extends \S2low\Tests\S2lowSymfonyWebTestCase
      * 2/ sendFileOnUniqueConnection est bien appelé avec un nommage correct
      * 3/ le passage à transmis se fait bien
      * @return void
+     * @throws \Exception
      */
     public function testSendOneTransactionBonneFilePasstrans()
     {
-        $id_t = $this->createPesAllerToSend("pes_aller_ok.xml");
+        $id_transaction = $this->createPesAllerToSend('pes_aller_ok.xml');
 
         $dgfipConnection = $this->getMockBuilder(DGFiPConnection::class)
             ->disableOriginalConstructor()->getMock();
 
-        $this->dgfipConnectionBuilderMock->expects($this->once())->method('get')
+        $this->connectBuilder->expects(static::once())->method('get')
             ->with(
                 new DGFiPConnectionConfiguration(
                     'std_server',
@@ -398,21 +446,20 @@ class HeliosEnvoiControlerTest extends \S2low\Tests\S2lowSymfonyWebTestCase
                     'helios_ftp_p_appli'
                 )
             )->willReturn($dgfipConnection);
-        $dgfipConnection->expects($this->once())->method("sendFileOnUniqueConnection")
+        $dgfipConnection->expects(static::once())->method('sendFileOnUniqueConnection')
             ->with(
                 'helios_ftp_dest',
                 'PES#123#034000#12',
-                "/data/tdt-workspace/helios/sending-tmp//PESALR2_123456789_" . date("ymd") . "_001.xml"
+                '/data/tdt-workspace/helios/sending-tmp//PESALR2_123456789_' . date('ymd') . '_001.xml'
             );
         ob_start();
-        $this->heliosEnvoiControler->sendOneTransaction($id_t, false);
+        $this->envoiControler->sendOneTransaction($id_transaction, false);
         ob_end_clean();
-        $heliosTransaction = new HeliosTransactionsSQL($this->getSQLQuery());
-        $info = $heliosTransaction->getInfo($id_t);
-        $this->assertEquals(HeliosTransactionsSQL::TRANSMIS, $info['last_status_id']);
-        $last_status_info = $heliosTransaction->getLastStatusInfo($id_t);
-        $this->assertEquals(
-            "Transaction $id_t transmise au serveur.",
+        $info_transaction = $this->transactionsSQL->getInfo($id_transaction);
+        static::assertEquals(HeliosTransactionsSQL::TRANSMIS, $info_transaction['last_status_id']);
+        $last_status_info = $this->transactionsSQL->getLastStatusInfo($id_transaction);
+        static::assertEquals(
+            "Transaction $id_transaction transmise au serveur.",
             $last_status_info['message']
         );
     }
@@ -424,18 +471,18 @@ class HeliosEnvoiControlerTest extends \S2low\Tests\S2lowSymfonyWebTestCase
      * 2/ sendFileOnUniqueConnection est bien appelé avec un nommage correct
      * 3/ le passage à transmis se fait bien
      * @return void
+     * @throws Exception
      */
     public function testSendOneTransactionBonneFilePasstrans2()
     {
-        $id_t = $this->createPesAllerToSend("pes_aller_ok.xml");
+        $id_transaction = $this->createPesAllerToSend('pes_aller_ok.xml');
 
-        $authoritySQL = new AuthoritySQL($this->getSQLQuery());
-        $authoritySQL->query("UPDATE authorities SET helios_use_passtrans = true WHERE id =1");
+        $this->authoritySQL->query('UPDATE authorities SET helios_use_passtrans = true WHERE id =1');
 
         $dgfipConnection = $this->getMockBuilder(DGFiPConnection::class)
             ->disableOriginalConstructor()->getMock();
 
-        $this->dgfipConnectionBuilderMock->expects($this->once())->method('get')
+        $this->connectBuilder->expects(static::once())->method('get')
             ->with(
                 new DGFiPConnectionConfiguration(
                     'passtrans_server',
@@ -450,16 +497,21 @@ class HeliosEnvoiControlerTest extends \S2low\Tests\S2lowSymfonyWebTestCase
                 )
             )
             ->willReturn($dgfipConnection);
-        $dgfipConnection->expects($this->once())->method("sendFileOnUniqueConnection")->with('helios_ftp_dest', 'PES#123#034000#12', "/data/tdt-workspace/helios/sending-tmp//PESALR2_123456789_" . date("ymd") . "_001.xml");
+        $dgfipConnection->expects(static::once())
+            ->method('sendFileOnUniqueConnection')
+            ->with(
+                'helios_ftp_dest',
+                'PES#123#034000#12',
+                '/data/tdt-workspace/helios/sending-tmp//PESALR2_123456789_' . date('ymd') . '_001.xml'
+            );
         ob_start();
-        $this->heliosEnvoiControler->sendOneTransaction($id_t, true);
+        $this->envoiControler->sendOneTransaction($id_transaction, true);
         ob_end_clean();
-        $heliosTransaction = new HeliosTransactionsSQL($this->getSQLQuery());
-        $info = $heliosTransaction->getInfo($id_t);
-        $this->assertEquals(HeliosTransactionsSQL::TRANSMIS, $info['last_status_id']);
-        $last_status_info = $heliosTransaction->getLastStatusInfo($id_t);
-        $this->assertEquals(
-            "Transaction $id_t transmise au serveur. [Passtrans]",
+        $info_transaction = $this->transactionsSQL->getInfo($id_transaction);
+        static::assertEquals(HeliosTransactionsSQL::TRANSMIS, $info_transaction['last_status_id']);
+        $last_status_info = $this->transactionsSQL->getLastStatusInfo($id_transaction);
+        static::assertEquals(
+            "Transaction $id_transaction transmise au serveur. [Passtrans]",
             $last_status_info['message']
         );
     }
@@ -470,20 +522,46 @@ class HeliosEnvoiControlerTest extends \S2low\Tests\S2lowSymfonyWebTestCase
      */
     private function getImportFile($filename): mixed
     {
-        $pes_aller = __DIR__ . "/../../../test/PHPUnit/helios/fixtures/{$filename}";
-        copy($pes_aller, $this->testStreamUrl . "/helios/" . sha1_file($pes_aller));
-        $id_t = $this->heliosController->importFile(8, $pes_aller, "pes_aller.xml");
-        return $id_t;
+        $pes_aller = __DIR__ . "/../../../test/PHPUnit/helios/fixtures/$filename";
+        copy($pes_aller, $this->testStreamUrl . '/helios/' . sha1_file($pes_aller));
+        return $this->heliosController->importFile(8, $pes_aller, 'pes_aller.xml');
     }
 
     /**
-     * @param mixed $id_t
+     * @param mixed $id_transaction
      * @return void
+     * @throws Exception
      */
-    private function validate(mixed $id_t): void
+    private function validate(mixed $id_transaction): void
     {
         ob_start();
-        $this->heliosEnvoiControler->validateOneTransaction($id_t);
+        $this->envoiControler->validateOneTransaction($id_transaction);
         ob_end_clean();
     }
+
+    /**
+     * Quand on envoie une transaction d'une autorité non Passtrans sur la file non passtrans, elle est
+     * correctement envoyée :
+     * 1/ les paramètres du serveur sont corrects (std_server, etc)
+     * 2/ sendFileOnUniqueConnection est bien appelé avec un nommage correct
+     * 3/ le passage à transmis se fait bien
+     * @return void
+     * @throws Exception
+     */
+    public function testSendOnePesAcquitRetour()
+    {
+        $id_transaction = $this->createPesAllerToSend('PES_ACQUIT_RETOUR.xml');
+        $this->envoiControler->sendOneTransaction($id_transaction, false);
+
+        $info_transaction = $this->transactionsSQL->getInfo($id_transaction);
+        static::assertEquals(
+            HeliosTransactionsSQL::TRANSMIS_SANS_ACK,
+            $info_transaction['last_status_id']
+        );
+        $last_status_info = $this->transactionsSQL->getLastStatusInfo($id_transaction);
+        static::assertEquals(
+            "Transaction $id_transaction transmise au serveur.",
+            $last_status_info['message']
+        );
+    }
 }