You are here

function MessageNotifyNotifierTest::testDeliver in Message Notify 7.2

Test send method.

Check the correct info is sent to delivery.

File

./message_notify.test, line 67

Class

MessageNotifyNotifierTest
Test the Message notifier plugins handling.

Code

function testDeliver() {
  $wrapper = entity_metadata_wrapper('message_type', $this->message_type);
  $message = message_create('foo');
  message_notify_send_message($message, array(), 'test');

  // The test notifier added the output to the message.
  $output = $message->output;
  $this
    ->assertEqual($output['foo'], $wrapper->{MESSAGE_FIELD_MESSAGE_TEXT}
    ->get(1)->value
    ->value(), 'Correct values rendered in first view mode.');
  $this
    ->assertEqual($output['bar'], $wrapper->message_text_another
    ->value(), 'Correct values rendered in second view mode.');
}