@@ -30,6 +30,8 @@ final class TlsIconTest extends TestCase
3030 /** @var string */
3131 private $ strSendmailCryptedTlsv12WithCipherVerify = '<img class="lock_icon" src="plugins/tls_icon/lock.svg" title="TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK" /> ' ;
3232
33+ /** @var string */
34+ private $ strStalwartCryptedTlsv13WithCipher = '<img class="lock_icon" src="plugins/tls_icon/lock.svg" title="TLSv1.3 with cipher TLS13_AES_256_GCM_SHA384" /> ' ;
3335
3436 public function testInstance ()
3537 {
@@ -379,4 +381,40 @@ public function testSendmailTLS13MultipleRecipients()
379381 ]
380382 ], $ headersProcessed );
381383 }
384+
385+ public function testStalwartTls ()
386+ {
387+ $ o = new tls_icon ();
388+ $ headersProcessed = $ o ->message_headers ([
389+ 'output ' => [
390+ 'subject ' => [
391+ 'value ' => 'Sent to you ' ,
392+ ],
393+ ],
394+ 'headers ' => (object ) [
395+ 'others ' => [
396+ 'received ' => 'from mail-yw1-f174.google.com (mail-yw1-f174.google.com [209.85.128.174] (AS15169 Google LLC, US))
397+ (using TLSv1.3 with cipher TLS13_AES_256_GCM_SHA384)
398+ by mail.example.org (Stalwart SMTP) with ESMTPS id 36DAF29F3A02098;
399+ Mon, 16 Jun 2025 13:33:03 +0000 ' ,
400+ ]
401+ ]
402+ ]);
403+ $ this ->assertEquals ([
404+ 'output ' => [
405+ 'subject ' => [
406+ 'value ' => 'Sent to you ' . $ this ->strStalwartCryptedTlsv13WithCipher ,
407+ 'html ' => 1 ,
408+ ],
409+ ],
410+ 'headers ' => (object ) [
411+ 'others ' => [
412+ 'received ' => 'from mail-yw1-f174.google.com (mail-yw1-f174.google.com [209.85.128.174] (AS15169 Google LLC, US))
413+ (using TLSv1.3 with cipher TLS13_AES_256_GCM_SHA384)
414+ by mail.example.org (Stalwart SMTP) with ESMTPS id 36DAF29F3A02098;
415+ Mon, 16 Jun 2025 13:33:03 +0000 ' ,
416+ ]
417+ ]
418+ ], $ headersProcessed );
419+ }
382420}
0 commit comments