You are here

public function MimeMailFormatHelperTest::testRfcHeaders in Mime Mail 8

Tests making headers RFC822-compliant.

@dataProvider providerRfcHeaders @covers ::mimeMailRfcHeaders

Parameters

array $headers: An array of headers where the keys are header field names and the values are the header field bodies.

string $expected: One string containing a concatenation of all formatted header fields.

File

tests/src/Kernel/MimeMailFormatHelperTest.php, line 326

Class

MimeMailFormatHelperTest
Tests that Mime Mail utility functions work properly.

Namespace

Drupal\Tests\mimemail\Kernel

Code

public function testRfcHeaders(array $headers, $expected) {
  $actual = MimeMailFormatHelper::mimeMailRfcHeaders($headers);
  $this
    ->assertSame($expected, $actual);
}