function PrivatemsgTestCase::checkThreadDelete in Privatemsg 7
Same name and namespace in other branches
- 6.2 privatemsg.test \PrivatemsgTestCase::checkThreadDelete()
- 7.2 privatemsg.test \PrivatemsgTestCase::checkThreadDelete()
1 call to PrivatemsgTestCase::checkThreadDelete()
File
- ./
privatemsg.test, line 802 - Test file for privatemsg.module
Class
Code
function checkThreadDelete($message) {
$this
->assertText($message->subject, t('Message is displayed.'));
$delete = array(
'list[' . $message->thread_id . ']' => 1,
);
$this
->drupalPost(NULL, $delete, t('Delete'));
$this
->assertText(t('Deleted @count thread.', array(
'@count' => 1,
)), t('Delete message displayed.'));
$this
->assertNoText($message->subject, t('Message is not displayed anymore.'));
$this
->assertText(t('No messages available.'), t('No messages available anymore.'));
// Revert delete action.
$this
->clickLink(t('undone'));
$this
->assertText(t('Restored @count thread.', array(
'@count' => 1,
)), t('Restore message displayed'));
$this
->assertText($message->subject, t('Message is displayed again.'));
$this
->assertNoText(t('No messages available.'), t('Messages are available.'));
}