diff --git a/core/modules/system/tests/src/Functional/Mail/HtmlToTextTest.php b/core/tests/Drupal/KernelTests/Core/Mail/MailFormatHelperTest.php
similarity index 96%
rename from core/modules/system/tests/src/Functional/Mail/HtmlToTextTest.php
rename to core/tests/Drupal/KernelTests/Core/Mail/MailFormatHelperTest.php
index bdbfd749c9..7c2da68b9a 100644
--- a/core/modules/system/tests/src/Functional/Mail/HtmlToTextTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Mail/MailFormatHelperTest.php
@@ -1,19 +1,22 @@
 <?php
 
-namespace Drupal\Tests\system\Functional\Mail;
+namespace Drupal\KernelTests\Core\Mail;
 
 use Drupal\Component\Utility\Html;
 use Drupal\Component\Utility\Unicode;
 use Drupal\Core\Mail\MailFormatHelper;
 use Drupal\Core\Site\Settings;
-use Drupal\Tests\BrowserTestBase;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Tests for \Drupal\Core\Mail\MailFormatHelper::htmlToText().
  *
+ * @coversDefaultClass \Drupal\Core\Mail\MailFormatHelper
+ *
  * @group Mail
  */
-class HtmlToTextTest extends BrowserTestBase {
+class MailFormatHelperTest extends KernelTestBase {
+
   /**
    * Converts a string to its PHP source equivalent for display in test messages.
    *
@@ -65,12 +68,18 @@ protected function assertHtmlToText($html, $text, $message, $allowed_tags = NULL
 
   /**
    * Test supported tags of \Drupal\Core\Mail\MailFormatHelper::htmlToText().
+   *
+   * @covers ::htmlToText
+   *
+   * @todo Unwrap this into a data provider.
+   * @todo Don't use globals.
    */
   public function testTags() {
     global $base_path, $base_url;
     $tests = [
       // @todo Trailing linefeeds should be trimmed.
       '<a href = "https://www.drupal.org">Drupal.org</a>' => "Drupal.org [1]\n\n[1] https://www.drupal.org\n",
+      '<a href = "https://www.drupal.org">Drupal' . "\n.org</a>" => "Drupal.org [1]\n\n[1] https://www.drupal.org\n",
       // @todo Footer URLs should be absolute.
       "<a href = \"$base_path\">Homepage</a>" => "Homepage [1]\n\n[1] $base_url/\n",
       '<address>Drupal</address>' => "Drupal\n",
@@ -160,6 +169,8 @@ public function testTags() {
 
   /**
    * Tests allowing tags in \Drupal\Core\Mail\MailFormatHelper::htmlToText().
+   *
+   * @covers ::htmlToText
    */
   public function testDrupalHtmlToTextArgs() {
     // The second parameter of \Drupal\Core\Mail\MailFormatHelper::htmlToText()
@@ -194,6 +205,8 @@ public function testDrupalHtmlToTextArgs() {
 
   /**
    * Test that whitespace is collapsed.
+   *
+   * @covers ::htmlToText
    */
   public function testDrupalHtmltoTextCollapsesWhitespace() {
     $input = "<p>Drupal  Drupal\n\nDrupal<pre>Drupal  Drupal\n\nDrupal</pre>Drupal  Drupal\n\nDrupal</p>";
@@ -210,6 +223,8 @@ public function testDrupalHtmltoTextCollapsesWhitespace() {
   /**
    * Test that text separated by block-level tags in HTML get separated by
    * (at least) a newline in the plaintext version.
+   *
+   * @covers ::htmlToText
    */
   public function testDrupalHtmlToTextBlockTagToNewline() {
     $input = '[text]'
@@ -260,6 +275,8 @@ public function testDrupalHtmlToTextBlockTagToNewline() {
 
   /**
    * Test that headers are properly separated from surrounding text.
+   *
+   * @covers ::htmlToText
    */
   public function testHeaderSeparation() {
     $html = 'Drupal<h1>Drupal</h1>Drupal';
@@ -285,6 +302,8 @@ public function testHeaderSeparation() {
 
   /**
    * Test that footnote references are properly generated.
+   *
+   * @covers ::htmlToText
    */
   public function testFootnoteReferences() {
     global $base_path, $base_url;
@@ -310,6 +329,8 @@ public function testFootnoteReferences() {
   /**
    * Test that combinations of paragraph breaks, line breaks, linefeeds,
    * and spaces are properly handled.
+   *
+   * @covers ::htmlToText
    */
   public function testDrupalHtmlToTextParagraphs() {
     $tests = [];
@@ -339,6 +360,8 @@ public function testDrupalHtmlToTextParagraphs() {
    *
    * RFC 821 says, "The maximum total length of a text line including the
    * <CRLF> is 1000 characters."
+   *
+   * @covers ::htmlToText
    */
   public function testVeryLongLineWrap() {
     $input = 'Drupal<br /><p>' . str_repeat('x', 2100) . '</p><br />Drupal';
@@ -359,6 +382,8 @@ public function testVeryLongLineWrap() {
    * Tests that trailing whitespace is removed before newlines.
    *
    * @see \Drupal\Core\Mail\MailFormatHelper::wrapMail()
+   *
+   * @covers ::wrapMail
    */
   public function testRemoveTrailingWhitespace() {
     $text = "Hi there! \nHerp Derp";
@@ -373,6 +398,8 @@ public function testRemoveTrailingWhitespace() {
    * stuffed) line consisting of DASH DASH SP is neither fixed nor flowed."
    *
    * @see \Drupal\Core\Mail\MailFormatHelper::wrapMail()
+   *
+   * @covers ::wrapMail
    */
   public function testUsenetSignature() {
     $text = "Hi there!\n-- \nHerp Derp";
