You are here

public function FormatTest::setUp in Swift Mailer 8.2

Overrides KernelTestBase::setUp

File

tests/src/Kernel/Plugin/Mail/FormatTest.php, line 35

Class

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

Namespace

Drupal\Tests\swiftmailer\Kernel\Plugin\Mail

Code

public function setUp() {
  parent::setUp();
  $this
    ->installConfig([
    'swiftmailer',
    'filter',
  ]);
  $this
    ->installEntitySchema('user');
  $this
    ->installSchema('user', 'users_data');
  $this->plugin = $this->container
    ->get('plugin.manager.mail')
    ->createInstance('swiftmailer');

  // Install the test theme for a simple template.
  \Drupal::service('theme_installer')
    ->install([
    'swiftmailer_test_theme',
  ]);
  \Drupal::configFactory()
    ->getEditable('system.theme')
    ->set('default', 'swiftmailer_test_theme')
    ->save();
}