You are here

public function MandrillActivityTestCase::testGetActivity in Mandrill 7.2

Tests getting an array of message activity for a given email address.

File

modules/mandrill_activity/tests/mandrill_activity.test, line 60
Test class and methods for the Mandrill Activity module.

Class

MandrillActivityTestCase
@file Test class and methods for the Mandrill Activity module.

Code

public function testGetActivity() {
  $email = 'recipient@example.com';
  $activity = mandrill_activity_get_activity($email);
  $this
    ->assertTrue(!empty($activity), 'Tested retrieving activity.');
  if (!empty($activity) && is_array($activity)) {
    foreach ($activity as $message) {
      $this
        ->assertEqual($message['email'], $email, 'Tested valid message: ' . $message['subject']);
    }
  }
}