You are here

protected function MandrillTestAPI::getTestMessagesData in Mandrill 8

Gets an array of messages used in tests.

1 call to MandrillTestAPI::getTestMessagesData()
MandrillTestAPI::getMessages in src/MandrillTestAPI.php
Gets messages received by an email address.

File

src/MandrillTestAPI.php, line 246

Class

MandrillTestAPI
Overrides functions in the Mandrill API service for testing.

Namespace

Drupal\mandrill

Code

protected function getTestMessagesData() {
  $messages = array();
  $message = array(
    'ts' => 1365190000,
    '_id' => 'abc123abc123abc123abc123',
    'sender' => 'sender@example.com',
    'template' => 'test-template',
    'subject' => 'Test Subject',
    'email' => 'recipient@example.com',
    'tags' => array(
      'test-tag',
    ),
    'opens' => 42,
    'opens_detail' => array(
      'ts' => 1365190001,
      'ip' => '55.55.55.55',
      'location' => 'Georgia, US',
      'ua' => 'Linux/Ubuntu/Chrome/Chrome 28.0.1500.53',
    ),
    'clicks' => 42,
    'clicks_detail' => array(
      'ts' => 1365190001,
      'url' => 'http://www.example.com',
      'ip' => '55.55.55.55',
      'location' => 'Georgia, US',
      'ua' => 'Linux/Ubuntu/Chrome/Chrome 28.0.1500.53',
    ),
    'state' => 'sent',
    'metadata' => array(
      'user_id' => 123,
      'website' => 'www.example.com',
    ),
  );
  $messages[] = $message;
  return $messages;
}