You are here

function MessagingTestCase::randomMessage in Messaging 6.3

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. 7 tests/messaging_test_case.inc \MessagingTestCase::randomMessage()
3 calls to MessagingTestCase::randomMessage()
Messaging_API_Tests::testMessagingBasicAPI in tests/messaging_api.test
Exercise basic API functions
Messaging_API_Tests::testMessagingSendingAPI in tests/messaging_api.test
Play with creating, retrieving, deleting a pair messages
Messaging_Methods_Tests::testMessagingMethods in tests/messaging_methods.test
Test message sending callbacks for enabled plug-ins

File

tests/messaging_testcase.inc, line 18

Class

MessagingTestCase

Code

function randomMessage() {
  $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);
}