You are here

public function SwiftMailerTest::testMassageMessageBody in Swift Mailer 8

Same name in this branch
  1. 8 tests/src/Unit/Plugin/Mail/SwiftMailerTest.php \Drupal\Tests\swiftmailer\Unit\Plugin\Mail\SwiftMailerTest::testMassageMessageBody()
  2. 8 tests/src/Kernel/Plugin/Mail/SwiftMailerTest.php \Drupal\Tests\swiftmailer\Kernel\Plugin\Mail\SwiftMailerTest::testMassageMessageBody()

Tests massaging the message body.

@dataProvider bodyDataProvider

File

tests/src/Kernel/Plugin/Mail/SwiftMailerTest.php, line 50

Class

SwiftMailerTest
@coversDefaultClass \Drupal\swiftmailer\Plugin\Mail\SwiftMailer @group swiftmailer

Namespace

Drupal\Tests\swiftmailer\Kernel\Plugin\Mail

Code

public function testMassageMessageBody(array $message, $expected) {
  $message['params']['format'] = SWIFTMAILER_FORMAT_HTML;
  $actual = $this->plugin
    ->massageMessageBody($message);
  $this
    ->assertSame($expected, (string) $actual['body']);
}