summaryrefslogtreecommitdiff
path: root/sites/all/modules/ctools/tests/ctools_plugin_test.module
diff options
context:
space:
mode:
Diffstat (limited to 'sites/all/modules/ctools/tests/ctools_plugin_test.module')
-rw-r--r--sites/all/modules/ctools/tests/ctools_plugin_test.module72
1 files changed, 72 insertions, 0 deletions
diff --git a/sites/all/modules/ctools/tests/ctools_plugin_test.module b/sites/all/modules/ctools/tests/ctools_plugin_test.module
new file mode 100644
index 000000000..567f6e73d
--- /dev/null
+++ b/sites/all/modules/ctools/tests/ctools_plugin_test.module
@@ -0,0 +1,72 @@
+<?php
+/**
+ * Define some plugin systems to test ctools plugin includes.
+ */
+
+/**
+ * Implementation of hook_ctools_plugin_dierctory()
+ */
+function ctools_plugin_test_ctools_plugin_directory($module, $plugin) {
+ if ($module == 'ctools_plugin_test') {
+ return 'plugins/' . $plugin;
+ }
+}
+
+function ctools_plugin_test_ctools_plugin_type() {
+ return array(
+ 'extra_defaults' => array(
+ 'defaults' => array(
+ 'bool' => true,
+ 'string' => 'string',
+ 'array' => array('some value'),
+ ),
+ ),
+ 'cached' => array(
+ 'cache' => TRUE,
+ 'classes' => array(
+ 'handler',
+ ),
+ ),
+ 'not_cached' => array(
+ 'cache' => FALSE,
+ 'classes' => array(
+ 'handler',
+ ),
+ ),
+ 'big_hook_cached' => array(
+ 'cache' => TRUE,
+ 'use hooks' => TRUE,
+ 'classes' => array(
+ 'handler',
+ ),
+ ),
+ 'big_hook_not_cached' => array(
+ 'cache' => FALSE,
+ 'use hooks' => TRUE,
+ 'classes' => array(
+ 'handler',
+ ),
+ ),
+ );
+}
+
+function ctools_plugin_test_ctools_plugin_test_big_hook_cached() {
+ return array(
+ 'test1' => array(
+ 'function' => 'ctools_plugin_test_hook_cached_test',
+ 'handler' => 'class1',
+ ),
+ );
+}
+
+function ctools_plugin_test_ctools_plugin_test_big_hook_not_cached() {
+ return array(
+ 'test1' => array(
+ 'function' => 'ctools_plugin_test_hook_not_cached_test',
+ 'class' => 'class1',
+ ),
+ );
+}
+
+function ctools_plugin_test_hook_cached_test() {}
+function ctools_plugin_test_hook_not_cached_test() {}