Files
roundcubemail/tests/Actions/Mail/Compose.php
Aleksander Machniak df7d8f1178 Improve auto-wrapping of plain text messages on preview and reply (#6974)
- fix auto-wrapping of some specific cases
- do not auto-wrap non-format=flowed content on preview
- do not auto-wrap content on reply
2021-10-15 10:44:02 +02:00

40 lines
823 B
PHP

<?php
/**
* Test class to test rcmail_action_mail_compose
*
* @package Tests
*/
class Actions_Mail_Compose extends ActionTestCase
{
/**
* Class constructor
*/
function test_class()
{
$object = new rcmail_action_mail_compose;
$this->assertInstanceOf('rcmail_action', $object);
}
/**
* Test quote_text() method
*/
function test_quote_text()
{
$action = new rcmail_action_mail_compose;
$this->assertSame('> ', $action->quote_text(''));
$result = $action->quote_text("test1\ntest2");
$expected = "> test1\n> test2";
$this->assertSame($expected, $result);
$result = $action->quote_text("> test1\n> test2");
$expected = ">> test1\n>> test2";
$this->assertSame($expected, $result);
}
}