mirror of
https://github.com/roundcube/roundcubemail.git
synced 2026-03-05 15:54:03 +01:00
* use fixed "roundcube/plugin-installer" * Use composer autoloader for plugins testing * cherrypick remaining from 9241 related with testing * minor legacy autoload improvements
31 lines
846 B
PHP
31 lines
846 B
PHP
<?php
|
|
|
|
class AdditionalMessageHeaders_Plugin extends ActionTestCase
|
|
{
|
|
/**
|
|
* Test the plugin
|
|
*/
|
|
public function test_plugin()
|
|
{
|
|
$rcube = rcube::get_instance();
|
|
$plugin = new additional_message_headers($rcube->plugins);
|
|
|
|
$this->assertInstanceOf('additional_message_headers', $plugin);
|
|
$this->assertInstanceOf('rcube_plugin', $plugin);
|
|
|
|
$plugin->init();
|
|
|
|
$args = ['message' => new Mail_mime()];
|
|
|
|
$result = $plugin->message_headers($args);
|
|
|
|
$this->assertSame("MIME-Version: 1.0\r\n", $result['message']->txtHeaders());
|
|
|
|
$rcube->config->set('additional_message_headers', ['X-Test' => 'Test']);
|
|
|
|
$result = $plugin->message_headers($args);
|
|
|
|
$this->assertSame("MIME-Version: 1.0\r\nX-Test: Test\r\n", $result['message']->txtHeaders());
|
|
}
|
|
}
|