You are here

function MessagingTestCase::randomMessage in Messaging 7

Same name and namespace in other branches
  1. 5 tests/messaging_testcase.inc \MessagingTestCase::randomMessage()
  2. 6.4 tests/messaging_test_case.inc \MessagingTestCase::randomMessage()
  3. 6 tests/messaging_testcase.inc \MessagingTestCase::randomMessage()
  4. 6.2 tests/messaging_testcase.inc \MessagingTestCase::randomMessage()
  5. 6.3 tests/messaging_testcase.inc \MessagingTestCase::randomMessage()
2 calls to MessagingTestCase::randomMessage()
Messaging_API_Tests::testMessagingBasicAPI in tests/messaging_api.test
Exercise basic API functions
Messaging_Methods_Tests::testMessagingMethods in tests/messaging_methods.test
Test message sending callbacks for enabled plug-ins

File

tests/messaging_test_case.inc, line 19

Class

MessagingTestCase

Code

function randomMessage($method = 'test') {
  $message['method'] = $method;
  $message['subject'] = $this
    ->randomName(50, 'Test subject ');
  $message['body'] = array(
    'header' => $this
      ->randomName(100, 'Test body header '),
    'main' => $this
      ->randomName(100, 'Test body main '),
    'footer' => $this
      ->randomName(100, 'Test body footer '),
  );
  $message['params'] = array(
    1,
    2,
  );
  return messaging_message_build($message);
}