messaging_testcase.inc in Messaging 5
File
tests/messaging_testcase.inc
View source
<?php
class MessagingTestCase extends DrupalTestCase {
var $_messaging_status;
function messagingStartTest() {
$this->_messaging_status['max_mqid'] = db_result(db_query("SELECT max(mqid) FROM {messaging_store}"));
}
function messagingCleanUp() {
db_query("DELETE FROM {messaging_store} WHERE mqid > %d", $this->_messaging_status['max_mqid']);
}
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 $message;
}
}