function PrivatemsgTestCase::checkThreadDelete in Privatemsg 6.2
Same name and namespace in other branches
- 7.2 privatemsg.test \PrivatemsgTestCase::checkThreadDelete()
- 7 privatemsg.test \PrivatemsgTestCase::checkThreadDelete()
1 call to PrivatemsgTestCase::checkThreadDelete()
File
- ./
privatemsg.test, line 678 - Test file for privatemsg.module
Class
- PrivatemsgTestCase
- @file Test file for privatemsg.module
Code
function checkThreadDelete($message) {
$this
->assertText($message['subject'], t('Message is displayed.'));
$delete = array(
'threads[' . $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.'));
}