You are here

protected function Mandrill_TagsTest::getTagsTestData in Mandrill 7.2

Gets an array of tags used in tests.

4 calls to Mandrill_TagsTest::getTagsTestData()
Mandrill_TagsTest::allTimeSeries in tests/includes/mandrill_tags_test.inc
Mandrill_TagsTest::getList in tests/includes/mandrill_tags_test.inc
Mandrill_TagsTest::info in tests/includes/mandrill_tags_test.inc
Mandrill_TagsTest::timeSeries in tests/includes/mandrill_tags_test.inc

File

tests/includes/mandrill_tags_test.inc, line 97
A virtual Mandrill Tags API implementation for use in testing.

Class

Mandrill_TagsTest
@file A virtual Mandrill Tags API implementation for use in testing.

Code

protected function getTagsTestData() {
  $tags = array();
  $stats_data = array(
    'sent' => 42,
    'hard_bounces' => 42,
    'soft_bounces' => 42,
    'rejects' => 42,
    'complaints' => 42,
    'unsubs' => 42,
    'opens' => 42,
    'unique_opens' => 42,
    'clicks' => 42,
    'unique_clicks' => 42,
  );
  $stats = array(
    'today' => $stats_data,
    'last_7_days' => $stats_data,
    'last_30_days' => $stats_data,
    'last_60_days' => $stats_data,
    'last_90_days' => $stats_data,
  );

  // Test Tag One
  $tag = array(
    'tag' => 'test-tag-one',
    'reputation' => 42,
    'sent' => 42,
    'hard_bounces' => 42,
    'soft_bounces' => 42,
    'rejects' => 42,
    'complaints' => 42,
    'unsubs' => 42,
    'opens' => 42,
    'clicks' => 42,
    'unique_opens' => 42,
    'unique_clicks' => 42,
    'stats' => $stats,
  );
  $tags[] = $tag;

  // Test Tag Two
  $tag = array(
    'tag' => 'test-tag-two',
    'reputation' => 42,
    'sent' => 42,
    'hard_bounces' => 42,
    'soft_bounces' => 42,
    'rejects' => 42,
    'complaints' => 42,
    'unsubs' => 42,
    'opens' => 42,
    'clicks' => 42,
    'unique_opens' => 42,
    'unique_clicks' => 42,
    'stats' => $stats,
  );
  $tags[] = $tag;
  return $tags;
}