Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F223996
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
32 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/plugins/acl/tests/Acl.php b/plugins/acl/tests/Acl.php
new file mode 100644
index 000000000..e752ac977
--- /dev/null
+++ b/plugins/acl/tests/Acl.php
@@ -0,0 +1,23 @@
+<?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);
+ }
+}
+
diff --git a/plugins/additional_message_headers/tests/AdditionalMessageHeaders.php b/plugins/additional_message_headers/tests/AdditionalMessageHeaders.php
new file mode 100644
index 000000000..1c54ffc42
--- /dev/null
+++ b/plugins/additional_message_headers/tests/AdditionalMessageHeaders.php
@@ -0,0 +1,23 @@
+<?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);
+ }
+}
+
diff --git a/plugins/archive/tests/Archive.php b/plugins/archive/tests/Archive.php
new file mode 100644
index 000000000..0a1eeae11
--- /dev/null
+++ b/plugins/archive/tests/Archive.php
@@ -0,0 +1,23 @@
+<?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);
+ }
+}
+
diff --git a/plugins/autologon/tests/Autologon.php b/plugins/autologon/tests/Autologon.php
new file mode 100644
index 000000000..0de193e4a
--- /dev/null
+++ b/plugins/autologon/tests/Autologon.php
@@ -0,0 +1,23 @@
+<?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);
+ }
+}
+
diff --git a/plugins/database_attachments/tests/DatabaseAttachments.php b/plugins/database_attachments/tests/DatabaseAttachments.php
new file mode 100644
index 000000000..f260737ab
--- /dev/null
+++ b/plugins/database_attachments/tests/DatabaseAttachments.php
@@ -0,0 +1,23 @@
+<?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);
+ }
+}
+
diff --git a/plugins/debug_logger/debug_logger.php b/plugins/debug_logger/debug_logger.php
index 1e015c201..87a163785 100644
--- a/plugins/debug_logger/debug_logger.php
+++ b/plugins/debug_logger/debug_logger.php
@@ -1,149 +1,150 @@
<?php
/**
* Debug Logger
*
* Enhanced logging for debugging purposes. It is not recommened
* to be enabled on production systems without testing because of
* the somewhat increased memory, cpu and disk i/o overhead.
*
* Debug Logger listens for existing console("message") calls and
* introduces start and end tags as well as free form tagging
* which can redirect messages to files. The resulting log files
* provide timing and tag quantity results.
*
* Enable the plugin in config/main.inc.php and add your desired
* log types and files.
*
* @version @package_version@
* @author Ziba Scott
* @website http://roundcube.net
*
* Example:
*
* config/main.inc.php:
*
* // $rcmail_config['debug_logger'][type of logging] = name of file in log_dir
* // The 'master' log includes timing information
* $rcmail_config['debug_logger']['master'] = 'master';
* // If you want sql messages to also go into a separate file
* $rcmail_config['debug_logger']['sql'] = 'sql';
*
* index.php (just after $RCMAIL->plugins->init()):
*
* console("my test","start");
* console("my message");
* console("my sql calls","start");
* console("cp -r * /dev/null","shell exec");
* console("select * from example","sql");
* console("select * from example","sql");
* console("select * from example","sql");
* console("end");
* console("end");
*
*
* logs/master (after reloading the main page):
*
* [17-Feb-2009 16:51:37 -0500] start: Task: mail.
* [17-Feb-2009 16:51:37 -0500] start: my test
* [17-Feb-2009 16:51:37 -0500] my message
* [17-Feb-2009 16:51:37 -0500] shell exec: cp -r * /dev/null
* [17-Feb-2009 16:51:37 -0500] start: my sql calls
* [17-Feb-2009 16:51:37 -0500] sql: select * from example
* [17-Feb-2009 16:51:37 -0500] sql: select * from example
* [17-Feb-2009 16:51:37 -0500] sql: select * from example
* [17-Feb-2009 16:51:37 -0500] end: my sql calls - 0.0018 seconds shell exec: 1, sql: 3,
* [17-Feb-2009 16:51:37 -0500] end: my test - 0.0055 seconds shell exec: 1, sql: 3,
* [17-Feb-2009 16:51:38 -0500] end: Task: mail. - 0.8854 seconds shell exec: 1, sql: 3,
*
* logs/sql (after reloading the main page):
*
* [17-Feb-2009 16:51:37 -0500] sql: select * from example
* [17-Feb-2009 16:51:37 -0500] sql: select * from example
* [17-Feb-2009 16:51:37 -0500] sql: select * from example
*/
class debug_logger extends rcube_plugin
{
function init()
{
require_once(dirname(__FILE__).'/runlog/runlog.php');
$this->runlog = new runlog();
if(!rcmail::get_instance()->config->get('log_dir')){
rcmail::get_instance()->config->set('log_dir',INSTALL_PATH.'logs');
}
$log_config = rcmail::get_instance()->config->get('debug_logger',array());
foreach($log_config as $type=>$file){
$this->runlog->set_file(rcmail::get_instance()->config->get('log_dir').'/'.$file, $type);
}
$start_string = "";
$action = rcmail::get_instance()->action;
$task = rcmail::get_instance()->task;
if($action){
$start_string .= "Action: ".$action.". ";
}
if($task){
$start_string .= "Task: ".$task.". ";
}
$this->runlog->start($start_string);
$this->add_hook('console', array($this, 'console'));
$this->add_hook('authenticate', array($this, 'authenticate'));
}
function authenticate($args){
$this->runlog->note('Authenticating '.$args['user'].'@'.$args['host']);
return $args;
}
function console($args){
$note = $args[0];
$type = $args[1];
if(!isset($args[1])){
// This could be extended to detect types based on the
// file which called console. For now only rcube_imap/rcube_storage is supported
$bt = debug_backtrace();
$file = $bt[3]['file'];
switch(basename($file)){
case 'rcube_imap.php':
$type = 'imap';
break;
case 'rcube_storage.php':
$type = 'storage';
break;
default:
$type = FALSE;
break;
}
}
switch($note){
case 'end':
$type = 'end';
break;
}
switch($type){
case 'start':
$this->runlog->start($note);
break;
case 'end':
$this->runlog->end();
break;
default:
$this->runlog->note($note, $type);
break;
}
return $args;
}
- function __destruct(){
- $this->runlog->end();
+ function __destruct()
+ {
+ if ($this->runlog)
+ $this->runlog->end();
}
}
-?>
diff --git a/plugins/debug_logger/tests/DebugLogger.php b/plugins/debug_logger/tests/DebugLogger.php
new file mode 100644
index 000000000..de20a069d
--- /dev/null
+++ b/plugins/debug_logger/tests/DebugLogger.php
@@ -0,0 +1,23 @@
+<?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);
+ }
+}
+
diff --git a/plugins/emoticons/tests/Emoticons.php b/plugins/emoticons/tests/Emoticons.php
new file mode 100644
index 000000000..4b6c303c2
--- /dev/null
+++ b/plugins/emoticons/tests/Emoticons.php
@@ -0,0 +1,23 @@
+<?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);
+ }
+}
+
diff --git a/plugins/enigma/tests/Enigma.php b/plugins/enigma/tests/Enigma.php
new file mode 100644
index 000000000..0d0d8f8ae
--- /dev/null
+++ b/plugins/enigma/tests/Enigma.php
@@ -0,0 +1,23 @@
+<?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);
+ }
+}
+
diff --git a/plugins/example_addressbook/tests/ExampleAddressbook.php b/plugins/example_addressbook/tests/ExampleAddressbook.php
new file mode 100644
index 000000000..4a54bd950
--- /dev/null
+++ b/plugins/example_addressbook/tests/ExampleAddressbook.php
@@ -0,0 +1,23 @@
+<?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);
+ }
+}
+
diff --git a/plugins/filesystem_attachments/tests/FilesystemAttachments.php b/plugins/filesystem_attachments/tests/FilesystemAttachments.php
new file mode 100644
index 000000000..dcab315d3
--- /dev/null
+++ b/plugins/filesystem_attachments/tests/FilesystemAttachments.php
@@ -0,0 +1,23 @@
+<?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);
+ }
+}
+
diff --git a/plugins/help/tests/Help.php b/plugins/help/tests/Help.php
new file mode 100644
index 000000000..baba492ae
--- /dev/null
+++ b/plugins/help/tests/Help.php
@@ -0,0 +1,23 @@
+<?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);
+ }
+}
+
diff --git a/plugins/hide_blockquote/tests/HideBlockquote.php b/plugins/hide_blockquote/tests/HideBlockquote.php
new file mode 100644
index 000000000..030c05324
--- /dev/null
+++ b/plugins/hide_blockquote/tests/HideBlockquote.php
@@ -0,0 +1,23 @@
+<?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);
+ }
+}
+
diff --git a/plugins/http_authentication/tests/HttpAuthentication.php b/plugins/http_authentication/tests/HttpAuthentication.php
new file mode 100644
index 000000000..c17236821
--- /dev/null
+++ b/plugins/http_authentication/tests/HttpAuthentication.php
@@ -0,0 +1,23 @@
+<?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);
+ }
+}
+
diff --git a/plugins/jqueryui/tests/Jqueryui.php b/plugins/jqueryui/tests/Jqueryui.php
new file mode 100644
index 000000000..3bcd27c9f
--- /dev/null
+++ b/plugins/jqueryui/tests/Jqueryui.php
@@ -0,0 +1,23 @@
+<?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);
+ }
+}
+
diff --git a/plugins/managesieve/tests/Managesieve.php b/plugins/managesieve/tests/Managesieve.php
new file mode 100644
index 000000000..d802f5614
--- /dev/null
+++ b/plugins/managesieve/tests/Managesieve.php
@@ -0,0 +1,23 @@
+<?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);
+ }
+}
+
diff --git a/plugins/markasjunk/tests/Markasjunk.php b/plugins/markasjunk/tests/Markasjunk.php
new file mode 100644
index 000000000..cdf13255e
--- /dev/null
+++ b/plugins/markasjunk/tests/Markasjunk.php
@@ -0,0 +1,23 @@
+<?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);
+ }
+}
+
diff --git a/plugins/new_user_dialog/tests/NewUserDialog.php b/plugins/new_user_dialog/tests/NewUserDialog.php
new file mode 100644
index 000000000..3a52f20f3
--- /dev/null
+++ b/plugins/new_user_dialog/tests/NewUserDialog.php
@@ -0,0 +1,23 @@
+<?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);
+ }
+}
+
diff --git a/plugins/new_user_identity/tests/NewUserIdentity.php b/plugins/new_user_identity/tests/NewUserIdentity.php
new file mode 100644
index 000000000..c1d385853
--- /dev/null
+++ b/plugins/new_user_identity/tests/NewUserIdentity.php
@@ -0,0 +1,23 @@
+<?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);
+ }
+}
+
diff --git a/plugins/newmail_notifier/tests/NewmailNotifier.php b/plugins/newmail_notifier/tests/NewmailNotifier.php
new file mode 100644
index 000000000..571912a61
--- /dev/null
+++ b/plugins/newmail_notifier/tests/NewmailNotifier.php
@@ -0,0 +1,23 @@
+<?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);
+ }
+}
+
diff --git a/plugins/password/tests/Password.php b/plugins/password/tests/Password.php
new file mode 100644
index 000000000..a9663a946
--- /dev/null
+++ b/plugins/password/tests/Password.php
@@ -0,0 +1,23 @@
+<?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);
+ }
+}
+
diff --git a/plugins/redundant_attachments/tests/RedundantAttachments.php b/plugins/redundant_attachments/tests/RedundantAttachments.php
new file mode 100644
index 000000000..386f97e59
--- /dev/null
+++ b/plugins/redundant_attachments/tests/RedundantAttachments.php
@@ -0,0 +1,23 @@
+<?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);
+ }
+}
+
diff --git a/plugins/show_additional_headers/tests/ShowAdditionalHeaders.php b/plugins/show_additional_headers/tests/ShowAdditionalHeaders.php
new file mode 100644
index 000000000..902ce510b
--- /dev/null
+++ b/plugins/show_additional_headers/tests/ShowAdditionalHeaders.php
@@ -0,0 +1,23 @@
+<?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);
+ }
+}
+
diff --git a/plugins/squirrelmail_usercopy/tests/SquirrelmailUsercopy.php b/plugins/squirrelmail_usercopy/tests/SquirrelmailUsercopy.php
new file mode 100644
index 000000000..2e35509f0
--- /dev/null
+++ b/plugins/squirrelmail_usercopy/tests/SquirrelmailUsercopy.php
@@ -0,0 +1,23 @@
+<?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);
+ }
+}
+
diff --git a/plugins/subscriptions_option/tests/SubscriptionsOption.php b/plugins/subscriptions_option/tests/SubscriptionsOption.php
new file mode 100644
index 000000000..6932a955f
--- /dev/null
+++ b/plugins/subscriptions_option/tests/SubscriptionsOption.php
@@ -0,0 +1,23 @@
+<?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);
+ }
+}
+
diff --git a/plugins/userinfo/tests/Userinfo.php b/plugins/userinfo/tests/Userinfo.php
new file mode 100644
index 000000000..762d5a1fa
--- /dev/null
+++ b/plugins/userinfo/tests/Userinfo.php
@@ -0,0 +1,23 @@
+<?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);
+ }
+}
+
diff --git a/plugins/vcard_attachments/tests/VcardAttachments.php b/plugins/vcard_attachments/tests/VcardAttachments.php
new file mode 100644
index 000000000..35fd7f447
--- /dev/null
+++ b/plugins/vcard_attachments/tests/VcardAttachments.php
@@ -0,0 +1,23 @@
+<?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);
+ }
+}
+
diff --git a/plugins/virtuser_file/tests/VirtuserFile.php b/plugins/virtuser_file/tests/VirtuserFile.php
new file mode 100644
index 000000000..a4362c3dc
--- /dev/null
+++ b/plugins/virtuser_file/tests/VirtuserFile.php
@@ -0,0 +1,23 @@
+<?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);
+ }
+}
+
diff --git a/plugins/virtuser_query/tests/VirtuserQuery.php b/plugins/virtuser_query/tests/VirtuserQuery.php
new file mode 100644
index 000000000..d5bd4ee4b
--- /dev/null
+++ b/plugins/virtuser_query/tests/VirtuserQuery.php
@@ -0,0 +1,23 @@
+<?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);
+ }
+}
+
diff --git a/plugins/zipdownload/tests/Zipdownload.php b/plugins/zipdownload/tests/Zipdownload.php
new file mode 100644
index 000000000..f3b4e1b35
--- /dev/null
+++ b/plugins/zipdownload/tests/Zipdownload.php
@@ -0,0 +1,23 @@
+<?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);
+ }
+}
+
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index a9e25610c..40659ebf0 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -1,35 +1,41 @@
<?php
/*
+-----------------------------------------------------------------------+
| tests/bootstrap.php |
| |
| This file is part of the Roundcube Webmail client |
| Copyright (C) 2009-2012, The Roundcube Dev Team |
| |
| Licensed under the GNU General Public License version 3 or |
| any later version with exceptions for skins & plugins. |
| See the README file for a full license statement. |
| |
| PURPOSE: |
| Environment initialization script for unit tests |
+-----------------------------------------------------------------------+
| Author: Thomas Bruederli <roundcube@gmail.com> |
| Author: Aleksander Machniak <alec@alec.pl> |
+-----------------------------------------------------------------------+
*/
if (php_sapi_name() != 'cli')
die("Not in shell mode (php-cli)");
if (!defined('INSTALL_PATH')) define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' );
define('TESTS_DIR', dirname(__FILE__) . '/');
if (@is_dir(TESTS_DIR . 'config')) {
define('RCMAIL_CONFIG_DIR', TESTS_DIR . 'config');
}
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.");
+}
diff --git a/tests/phpunit.xml b/tests/phpunit.xml
index 5a858111b..da0f899a9 100644
--- a/tests/phpunit.xml
+++ b/tests/phpunit.xml
@@ -1,40 +1,69 @@
<phpunit backupGlobals="false"
bootstrap="bootstrap.php"
colors="true">
<testsuites>
<testsuite name="All Tests">
<file>Framework/BaseReplacer.php</file>
<file>Framework/Bootstrap.php</file>
<file>Framework/Browser.php</file>
<file>Framework/Cache.php</file>
<file>Framework/Charset.php</file>
<file>Framework/ContentFilter.php</file>
<file>Framework/Csv2vcard.php</file>
<file>Framework/Enriched.php</file>
<file>Framework/Html.php</file>
<file>Framework/Html2text.php</file>
<file>Framework/Imap.php</file>
<file>Framework/ImapGeneric.php</file>
<file>Framework/Image.php</file>
<file>Framework/MessageHeader.php</file>
<file>Framework/MessagePart.php</file>
<file>Framework/Mime.php</file>
<file>Framework/Rcube.php</file>
<file>Framework/ResultIndex.php</file>
<file>Framework/ResultSet.php</file>
<file>Framework/ResultThread.php</file>
<file>Framework/Smtp.php</file>
<file>Framework/Spellchecker.php</file>
<file>Framework/StringReplacer.php</file>
<file>Framework/User.php</file>
<file>Framework/Utils.php</file>
<file>Framework/VCard.php</file>
<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>
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Mar 1, 7:04 AM (1 d, 8 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
166203
Default Alt Text
(32 KB)
Attached To
Mode
R3 roundcubemail
Attached
Detach File
Event Timeline
Log In to Comment