You are here

public function MandrillHooksTestCase::testValidAttachmentTypesAlterHook in Mandrill 7.2

Tests implementing hook_mandrill_valid_attachment_types_alter().

File

tests/mandrill_hooks.test, line 91
Test class and methods for the Mandrill Test module.

Class

MandrillHooksTestCase
@file Test class and methods for the Mandrill Test module.

Code

public function testValidAttachmentTypesAlterHook() {
  $types = array(
    'image/png',
    'image/jpeg',
    'image/gif',
  );

  /**
   * Perform alterations on the attachment types array.
   * @see mandrill_test_mandrill_valid_attachment_types_alter()
   */
  drupal_alter('mandrill_valid_attachment_types', $types);
  $this
    ->assertTrue(in_array('application/pdf', $types), 'Tested altered attachment types.');
}