You are here

protected function MandrillTestCase::setUp in Mandrill 8

Pre-test setup function.

Enables dependencies. Sets the mandrill_api_key variable to the test key.

Overrides BrowserTestBase::setUp

File

tests/src/Functional/MandrillTestCase.php, line 33
Contains \Drupal\mandrill\Tests\MandrillTestCase.

Class

MandrillTestCase
Test core Mandrill functionality.

Namespace

Drupal\mandrill\Tests

Code

protected function setUp() {
  parent::setUp();
  $config = \Drupal::service('config.factory')
    ->getEditable('mandrill.settings');
  $config
    ->set('mandrill_from_email', 'foo@bar.com');
  $config
    ->set('mandrill_from_name', 'foo');
  $config
    ->set('mandrill_api_key', 'MANDRILL_TEST_API_KEY');
  $config
    ->save();
}