protected function Mandrill_MessagesTest::getTestMessagesData in Mandrill 7.2
Gets an array of messages used in tests.
1 call to Mandrill_MessagesTest::getTestMessagesData()
- Mandrill_MessagesTest::search in tests/
includes/ mandrill_messages_test.inc
File
- tests/
includes/ mandrill_messages_test.inc, line 107 - A virtual Mandrill Messages API implementation for use in testing.
Class
- Mandrill_MessagesTest
- @file A virtual Mandrill Messages API implementation for use in testing.
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;
}