Add basic tests for plugins
29 files added
3 files modified
New file |
| | |
| | | <?php |
| | | |
| | | class Acl_Plugin extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | function setUp() |
| | | { |
| | | include_once dirname(__FILE__) . '/../acl.php'; |
| | | } |
| | | |
| | | /** |
| | | * Plugin object construction test |
| | | */ |
| | | function test_constructor() |
| | | { |
| | | $rcube = rcube::get_instance(); |
| | | $plugin = new acl($rcube->api); |
| | | |
| | | $this->assertInstanceOf('acl', $plugin); |
| | | $this->assertInstanceOf('rcube_plugin', $plugin); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | <?php |
| | | |
| | | class AdditionalMessageHeaders_Plugin extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | function setUp() |
| | | { |
| | | include_once dirname(__FILE__) . '/../additional_message_headers.php'; |
| | | } |
| | | |
| | | /** |
| | | * Plugin object construction test |
| | | */ |
| | | function test_constructor() |
| | | { |
| | | $rcube = rcube::get_instance(); |
| | | $plugin = new additional_message_headers($rcube->api); |
| | | |
| | | $this->assertInstanceOf('additional_message_headers', $plugin); |
| | | $this->assertInstanceOf('rcube_plugin', $plugin); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | <?php |
| | | |
| | | class Archive_Plugin extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | function setUp() |
| | | { |
| | | include_once dirname(__FILE__) . '/../archive.php'; |
| | | } |
| | | |
| | | /** |
| | | * Plugin object construction test |
| | | */ |
| | | function test_constructor() |
| | | { |
| | | $rcube = rcube::get_instance(); |
| | | $plugin = new archive($rcube->api); |
| | | |
| | | $this->assertInstanceOf('archive', $plugin); |
| | | $this->assertInstanceOf('rcube_plugin', $plugin); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | <?php |
| | | |
| | | class Autologon_Plugin extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | function setUp() |
| | | { |
| | | include_once dirname(__FILE__) . '/../autologon.php'; |
| | | } |
| | | |
| | | /** |
| | | * Plugin object construction test |
| | | */ |
| | | function test_constructor() |
| | | { |
| | | $rcube = rcube::get_instance(); |
| | | $plugin = new autologon($rcube->api); |
| | | |
| | | $this->assertInstanceOf('autologon', $plugin); |
| | | $this->assertInstanceOf('rcube_plugin', $plugin); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | <?php |
| | | |
| | | class DatabaseAttachments_Plugin extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | function setUp() |
| | | { |
| | | include_once dirname(__FILE__) . '/../database_attachments.php'; |
| | | } |
| | | |
| | | /** |
| | | * Plugin object construction test |
| | | */ |
| | | function test_constructor() |
| | | { |
| | | $rcube = rcube::get_instance(); |
| | | $plugin = new database_attachments($rcube->api); |
| | | |
| | | $this->assertInstanceOf('database_attachments', $plugin); |
| | | $this->assertInstanceOf('rcube_plugin', $plugin); |
| | | } |
| | | } |
| | | |
| | |
| | | return $args; |
| | | } |
| | | |
| | | function __destruct(){ |
| | | $this->runlog->end(); |
| | | function __destruct() |
| | | { |
| | | if ($this->runlog) |
| | | $this->runlog->end(); |
| | | } |
| | | } |
| | | ?> |
New file |
| | |
| | | <?php |
| | | |
| | | class DebugLogger_Plugin extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | function setUp() |
| | | { |
| | | include_once dirname(__FILE__) . '/../debug_logger.php'; |
| | | } |
| | | |
| | | /** |
| | | * Plugin object construction test |
| | | */ |
| | | function test_constructor() |
| | | { |
| | | $rcube = rcube::get_instance(); |
| | | $plugin = new debug_logger($rcube->api); |
| | | |
| | | $this->assertInstanceOf('debug_logger', $plugin); |
| | | $this->assertInstanceOf('rcube_plugin', $plugin); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | <?php |
| | | |
| | | class Emoticons_Plugin extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | function setUp() |
| | | { |
| | | include_once dirname(__FILE__) . '/../emoticons.php'; |
| | | } |
| | | |
| | | /** |
| | | * Plugin object construction test |
| | | */ |
| | | function test_constructor() |
| | | { |
| | | $rcube = rcube::get_instance(); |
| | | $plugin = new emoticons($rcube->api); |
| | | |
| | | $this->assertInstanceOf('emoticons', $plugin); |
| | | $this->assertInstanceOf('rcube_plugin', $plugin); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | <?php |
| | | |
| | | class Enigma_Plugin extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | function setUp() |
| | | { |
| | | include_once dirname(__FILE__) . '/../enigma.php'; |
| | | } |
| | | |
| | | /** |
| | | * Plugin object construction test |
| | | */ |
| | | function test_constructor() |
| | | { |
| | | $rcube = rcube::get_instance(); |
| | | $plugin = new enigma($rcube->api); |
| | | |
| | | $this->assertInstanceOf('enigma', $plugin); |
| | | $this->assertInstanceOf('rcube_plugin', $plugin); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | <?php |
| | | |
| | | class ExampleAddressbook_Plugin extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | function setUp() |
| | | { |
| | | include_once dirname(__FILE__) . '/../example_addressbook.php'; |
| | | } |
| | | |
| | | /** |
| | | * Plugin object construction test |
| | | */ |
| | | function test_constructor() |
| | | { |
| | | $rcube = rcube::get_instance(); |
| | | $plugin = new example_addressbook($rcube->api); |
| | | |
| | | $this->assertInstanceOf('example_addressbook', $plugin); |
| | | $this->assertInstanceOf('rcube_plugin', $plugin); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | <?php |
| | | |
| | | class FilesystemAttachments_Plugin extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | function setUp() |
| | | { |
| | | include_once dirname(__FILE__) . '/../filesystem_attachments.php'; |
| | | } |
| | | |
| | | /** |
| | | * Plugin object construction test |
| | | */ |
| | | function test_constructor() |
| | | { |
| | | $rcube = rcube::get_instance(); |
| | | $plugin = new filesystem_attachments($rcube->api); |
| | | |
| | | $this->assertInstanceOf('filesystem_attachments', $plugin); |
| | | $this->assertInstanceOf('rcube_plugin', $plugin); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | <?php |
| | | |
| | | class Help_Plugin extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | function setUp() |
| | | { |
| | | include_once dirname(__FILE__) . '/../help.php'; |
| | | } |
| | | |
| | | /** |
| | | * Plugin object construction test |
| | | */ |
| | | function test_constructor() |
| | | { |
| | | $rcube = rcube::get_instance(); |
| | | $plugin = new help($rcube->api); |
| | | |
| | | $this->assertInstanceOf('help', $plugin); |
| | | $this->assertInstanceOf('rcube_plugin', $plugin); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | <?php |
| | | |
| | | class HideBlockquote_Plugin extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | function setUp() |
| | | { |
| | | include_once dirname(__FILE__) . '/../hide_blockquote.php'; |
| | | } |
| | | |
| | | /** |
| | | * Plugin object construction test |
| | | */ |
| | | function test_constructor() |
| | | { |
| | | $rcube = rcube::get_instance(); |
| | | $plugin = new hide_blockquote($rcube->api); |
| | | |
| | | $this->assertInstanceOf('hide_blockquote', $plugin); |
| | | $this->assertInstanceOf('rcube_plugin', $plugin); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | <?php |
| | | |
| | | class HttpAuthentication_Plugin extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | function setUp() |
| | | { |
| | | include_once dirname(__FILE__) . '/../http_authentication.php'; |
| | | } |
| | | |
| | | /** |
| | | * Plugin object construction test |
| | | */ |
| | | function test_constructor() |
| | | { |
| | | $rcube = rcube::get_instance(); |
| | | $plugin = new http_authentication($rcube->api); |
| | | |
| | | $this->assertInstanceOf('http_authentication', $plugin); |
| | | $this->assertInstanceOf('rcube_plugin', $plugin); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | <?php |
| | | |
| | | class Jqueryui_Plugin extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | function setUp() |
| | | { |
| | | include_once dirname(__FILE__) . '/../jqueryui.php'; |
| | | } |
| | | |
| | | /** |
| | | * Plugin object construction test |
| | | */ |
| | | function test_constructor() |
| | | { |
| | | $rcube = rcube::get_instance(); |
| | | $plugin = new jqueryui($rcube->api); |
| | | |
| | | $this->assertInstanceOf('jqueryui', $plugin); |
| | | $this->assertInstanceOf('rcube_plugin', $plugin); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | <?php |
| | | |
| | | class Managesieve_Plugin extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | function setUp() |
| | | { |
| | | include_once dirname(__FILE__) . '/../managesieve.php'; |
| | | } |
| | | |
| | | /** |
| | | * Plugin object construction test |
| | | */ |
| | | function test_constructor() |
| | | { |
| | | $rcube = rcube::get_instance(); |
| | | $plugin = new managesieve($rcube->api); |
| | | |
| | | $this->assertInstanceOf('managesieve', $plugin); |
| | | $this->assertInstanceOf('rcube_plugin', $plugin); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | <?php |
| | | |
| | | class Markasjunk_Plugin extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | function setUp() |
| | | { |
| | | include_once dirname(__FILE__) . '/../markasjunk.php'; |
| | | } |
| | | |
| | | /** |
| | | * Plugin object construction test |
| | | */ |
| | | function test_constructor() |
| | | { |
| | | $rcube = rcube::get_instance(); |
| | | $plugin = new markasjunk($rcube->api); |
| | | |
| | | $this->assertInstanceOf('markasjunk', $plugin); |
| | | $this->assertInstanceOf('rcube_plugin', $plugin); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | <?php |
| | | |
| | | class NewUserDialog_Plugin extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | function setUp() |
| | | { |
| | | include_once dirname(__FILE__) . '/../new_user_dialog.php'; |
| | | } |
| | | |
| | | /** |
| | | * Plugin object construction test |
| | | */ |
| | | function test_constructor() |
| | | { |
| | | $rcube = rcube::get_instance(); |
| | | $plugin = new new_user_dialog($rcube->api); |
| | | |
| | | $this->assertInstanceOf('new_user_dialog', $plugin); |
| | | $this->assertInstanceOf('rcube_plugin', $plugin); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | <?php |
| | | |
| | | class NewUserIdentity_Plugin extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | function setUp() |
| | | { |
| | | include_once dirname(__FILE__) . '/../new_user_identity.php'; |
| | | } |
| | | |
| | | /** |
| | | * Plugin object construction test |
| | | */ |
| | | function test_constructor() |
| | | { |
| | | $rcube = rcube::get_instance(); |
| | | $plugin = new new_user_identity($rcube->api); |
| | | |
| | | $this->assertInstanceOf('new_user_identity', $plugin); |
| | | $this->assertInstanceOf('rcube_plugin', $plugin); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | <?php |
| | | |
| | | class NewmailNotifier_Plugin extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | function setUp() |
| | | { |
| | | include_once dirname(__FILE__) . '/../newmail_notifier.php'; |
| | | } |
| | | |
| | | /** |
| | | * Plugin object construction test |
| | | */ |
| | | function test_constructor() |
| | | { |
| | | $rcube = rcube::get_instance(); |
| | | $plugin = new newmail_notifier($rcube->api); |
| | | |
| | | $this->assertInstanceOf('newmail_notifier', $plugin); |
| | | $this->assertInstanceOf('rcube_plugin', $plugin); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | <?php |
| | | |
| | | class Password_Plugin extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | function setUp() |
| | | { |
| | | include_once dirname(__FILE__) . '/../password.php'; |
| | | } |
| | | |
| | | /** |
| | | * Plugin object construction test |
| | | */ |
| | | function test_constructor() |
| | | { |
| | | $rcube = rcube::get_instance(); |
| | | $plugin = new password($rcube->api); |
| | | |
| | | $this->assertInstanceOf('password', $plugin); |
| | | $this->assertInstanceOf('rcube_plugin', $plugin); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | <?php |
| | | |
| | | class RedundantAttachments_Plugin extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | function setUp() |
| | | { |
| | | include_once dirname(__FILE__) . '/../redundant_attachments.php'; |
| | | } |
| | | |
| | | /** |
| | | * Plugin object construction test |
| | | */ |
| | | function test_constructor() |
| | | { |
| | | $rcube = rcube::get_instance(); |
| | | $plugin = new redundant_attachments($rcube->api); |
| | | |
| | | $this->assertInstanceOf('redundant_attachments', $plugin); |
| | | $this->assertInstanceOf('rcube_plugin', $plugin); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | <?php |
| | | |
| | | class ShowAdditionalHeaders_Plugin extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | function setUp() |
| | | { |
| | | include_once dirname(__FILE__) . '/../show_additional_headers.php'; |
| | | } |
| | | |
| | | /** |
| | | * Plugin object construction test |
| | | */ |
| | | function test_constructor() |
| | | { |
| | | $rcube = rcube::get_instance(); |
| | | $plugin = new show_additional_headers($rcube->api); |
| | | |
| | | $this->assertInstanceOf('show_additional_headers', $plugin); |
| | | $this->assertInstanceOf('rcube_plugin', $plugin); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | <?php |
| | | |
| | | class SquirrelmailUsercopy_Plugin extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | function setUp() |
| | | { |
| | | include_once dirname(__FILE__) . '/../squirrelmail_usercopy.php'; |
| | | } |
| | | |
| | | /** |
| | | * Plugin object construction test |
| | | */ |
| | | function test_constructor() |
| | | { |
| | | $rcube = rcube::get_instance(); |
| | | $plugin = new squirrelmail_usercopy($rcube->api); |
| | | |
| | | $this->assertInstanceOf('squirrelmail_usercopy', $plugin); |
| | | $this->assertInstanceOf('rcube_plugin', $plugin); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | <?php |
| | | |
| | | class SubscriptionsOption_Plugin extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | function setUp() |
| | | { |
| | | include_once dirname(__FILE__) . '/../subscriptions_option.php'; |
| | | } |
| | | |
| | | /** |
| | | * Plugin object construction test |
| | | */ |
| | | function test_constructor() |
| | | { |
| | | $rcube = rcube::get_instance(); |
| | | $plugin = new subscriptions_option($rcube->api); |
| | | |
| | | $this->assertInstanceOf('subscriptions_option', $plugin); |
| | | $this->assertInstanceOf('rcube_plugin', $plugin); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | <?php |
| | | |
| | | class Userinfo_Plugin extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | function setUp() |
| | | { |
| | | include_once dirname(__FILE__) . '/../userinfo.php'; |
| | | } |
| | | |
| | | /** |
| | | * Plugin object construction test |
| | | */ |
| | | function test_constructor() |
| | | { |
| | | $rcube = rcube::get_instance(); |
| | | $plugin = new userinfo($rcube->api); |
| | | |
| | | $this->assertInstanceOf('userinfo', $plugin); |
| | | $this->assertInstanceOf('rcube_plugin', $plugin); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | <?php |
| | | |
| | | class VcardAttachments_Plugin extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | function setUp() |
| | | { |
| | | include_once dirname(__FILE__) . '/../vcard_attachments.php'; |
| | | } |
| | | |
| | | /** |
| | | * Plugin object construction test |
| | | */ |
| | | function test_constructor() |
| | | { |
| | | $rcube = rcube::get_instance(); |
| | | $plugin = new vcard_attachments($rcube->api); |
| | | |
| | | $this->assertInstanceOf('vcard_attachments', $plugin); |
| | | $this->assertInstanceOf('rcube_plugin', $plugin); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | <?php |
| | | |
| | | class VirtuserFile_Plugin extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | function setUp() |
| | | { |
| | | include_once dirname(__FILE__) . '/../virtuser_file.php'; |
| | | } |
| | | |
| | | /** |
| | | * Plugin object construction test |
| | | */ |
| | | function test_constructor() |
| | | { |
| | | $rcube = rcube::get_instance(); |
| | | $plugin = new virtuser_file($rcube->api); |
| | | |
| | | $this->assertInstanceOf('virtuser_file', $plugin); |
| | | $this->assertInstanceOf('rcube_plugin', $plugin); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | <?php |
| | | |
| | | class VirtuserQuery_Plugin extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | function setUp() |
| | | { |
| | | include_once dirname(__FILE__) . '/../virtuser_query.php'; |
| | | } |
| | | |
| | | /** |
| | | * Plugin object construction test |
| | | */ |
| | | function test_constructor() |
| | | { |
| | | $rcube = rcube::get_instance(); |
| | | $plugin = new virtuser_query($rcube->api); |
| | | |
| | | $this->assertInstanceOf('virtuser_query', $plugin); |
| | | $this->assertInstanceOf('rcube_plugin', $plugin); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | <?php |
| | | |
| | | class Zipdownload_Plugin extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | function setUp() |
| | | { |
| | | include_once dirname(__FILE__) . '/../zipdownload.php'; |
| | | } |
| | | |
| | | /** |
| | | * Plugin object construction test |
| | | */ |
| | | function test_constructor() |
| | | { |
| | | $rcube = rcube::get_instance(); |
| | | $plugin = new zipdownload($rcube->api); |
| | | |
| | | $this->assertInstanceOf('zipdownload', $plugin); |
| | | $this->assertInstanceOf('rcube_plugin', $plugin); |
| | | } |
| | | } |
| | | |
| | |
| | | require_once(INSTALL_PATH . 'program/include/iniset.php'); |
| | | |
| | | rcmail::get_instance()->config->set('devel_mode', false); |
| | | |
| | | // Extend include path so some plugin test won't fail |
| | | $include_path = ini_get('include_path') . PATH_SEPARATOR . TESTS_DIR . '..'; |
| | | if (set_include_path($include_path) === false) { |
| | | die("Fatal error: ini_set/set_include_path does not work."); |
| | | } |
| | |
| | | <file>Framework/Washtml.php</file> |
| | | <file>MailFunc.php</file> |
| | | </testsuite> |
| | | <testsuite name="Managesieve Tests"> |
| | | <testsuite name="Plugins Tests"> |
| | | <file>./../plugins/acl/tests/Acl.php</file> |
| | | <file>./../plugins/additional_message_headers/tests/AdditionalMessageHeaders.php</file> |
| | | <file>./../plugins/archive/tests/Archive.php</file> |
| | | <file>./../plugins/autologon/tests/Autologon.php</file> |
| | | <file>./../plugins/database_attachments/tests/DatabaseAttachments.php</file> |
| | | <file>./../plugins/debug_logger/tests/DebugLogger.php</file> |
| | | <file>./../plugins/emoticons/tests/Emoticons.php</file> |
| | | <file>./../plugins/enigma/tests/Enigma.php</file> |
| | | <file>./../plugins/example_addressbook/tests/ExampleAddressbook.php</file> |
| | | <file>./../plugins/filesystem_attachments/tests/FilesystemAttachments.php</file> |
| | | <file>./../plugins/help/tests/Help.php</file> |
| | | <file>./../plugins/hide_blockquote/tests/HideBlockquote.php</file> |
| | | <file>./../plugins/http_authentication/tests/HttpAuthentication.php</file> |
| | | <file>./../plugins/jqueryui/tests/Jqueryui.php</file> |
| | | <file>./../plugins/managesieve/tests/Managesieve.php</file> |
| | | <file>./../plugins/managesieve/tests/Parser.php</file> |
| | | <file>./../plugins/managesieve/tests/Tokenizer.php</file> |
| | | <file>./../plugins/markasjunk/tests/Markasjunk.php</file> |
| | | <file>./../plugins/new_user_dialog/tests/NewUserDialog.php</file> |
| | | <file>./../plugins/new_user_identity/tests/NewUserIdentity.php</file> |
| | | <file>./../plugins/newmail_notifier/tests/NewmailNotifier.php</file> |
| | | <file>./../plugins/password/tests/Password.php</file> |
| | | <file>./../plugins/redundant_attachments/tests/RedundantAttachments.php</file> |
| | | <file>./../plugins/show_additional_headers/tests/ShowAdditionalHeaders.php</file> |
| | | <file>./../plugins/squirrelmail_usercopy/tests/Squirrelmail_usercopy.php</file> |
| | | <file>./../plugins/subscriptions_option/tests/SubscriptionsOption.php</file> |
| | | <file>./../plugins/userinfo/tests/Userinfo.php</file> |
| | | <file>./../plugins/vcard_attachments/tests/VcardAttachments.php</file> |
| | | <file>./../plugins/virtuser_file/tests/VirtuserFile.php</file> |
| | | <file>./../plugins/virtuser_query/tests/VirtuserQuery.php</file> |
| | | <file>./../plugins/zipdownload/tests/Zipdownload.php</file> |
| | | </testsuite> |
| | | </testsuites> |
| | | </phpunit> |