diff --git a/plugin.module b/plugin.module index cbc8043..60191ce 100644 --- a/plugin.module +++ b/plugin.module @@ -51,7 +51,7 @@ function plugin_get_info($type, $plugin = NULL) { $info_key = 'plugin_info_' . $type; if (empty($plugin_info[$type])) { - if ($cache = cache_get($info_key)) { + if (FALSE && $cache = cache_get($info_key)) { $plugin_info[$type] = $cache->data; } else { diff --git a/plugin.test b/plugin.test index e8422a5..a1c793f 100644 --- a/plugin.test +++ b/plugin.test @@ -37,41 +37,49 @@ class PluginTestCase extends DrupalWebTestCase { /** * Confirm that test plugins register properly from the alter hook. */ - function testAlterHookRegistration() { + /*function testAlterHookRegistration() { $plugins = plugin_get_info('fancystring'); $plugin_names = array_keys($plugins); $this->assertTrue(in_array('rot', $plugin_names), t('Plugin type is registered from type-specific alter hook')); } + */ /** * Confirm that test plugins register properly from an info file. */ - function testInfoRegistration() { + /*function testInfoRegistration() { $plugins = plugin_get_info('fancystring'); $plugin_names = array_keys($plugins); $this->assertTrue(in_array('uppercase', $plugin_names), t('Plugin type is registered from info file')); } + */ /** * Confirm that we get the right controller for a given plugin type. */ + /* function testController() { $controller = plugin_controller('fancystring'); $this->assertTrue($controller instanceof PluginControllerVariableReuse, t('Correct controller class returned.')); } + + */ /** * Confirm that if there is no default configuration, we get nothing. */ + /* function testDefaultPlugin() { $plugin = plugin('fancystring'); $this->assertTrue($plugin instanceof FancyStringDummy, t('Correct plugin class returned.')); } + + */ } diff --git a/plugin_test/plugin_test.info b/plugin_test/plugin_test.info index 652154c..e06c14e 100644 --- a/plugin_test/plugin_test.info +++ b/plugin_test/plugin_test.info @@ -2,5 +2,5 @@ name = Plugin Test description = Test module for plugins core = 7.x files[] = plugin_test.module -hidden = TRUE +;hidden = TRUE dependencies[] = plugin \ No newline at end of file diff --git a/plugin_test/plugin_test.module b/plugin_test/plugin_test.module index fb775bc..b5fd4bc 100644 --- a/plugin_test/plugin_test.module +++ b/plugin_test/plugin_test.module @@ -1,5 +1,35 @@ 'Plugin test', + 'page callback' => 'plugin_test_page', + 'access arguments' => array('access content'), + + ); + + return $items; +} + +/** + * Dummy page callback for testing things faster than unit tests can. + */ +function plugin_test_page() { + $plugins = plugin_get_info('fancystring'); + + $plugin_names = array_keys($plugins); + + dpm($plugin_names); + + return 'x'; +} + /** * Implements hook_plugin_type_info(). */ @@ -22,7 +52,7 @@ function plugin_test_plugin_type_info() { * * I think we actually deprecated the generic function... */ -function plugin_test_plugin_info() { +function plugin_test_plugin_fancystring_info() { $plugins['dummy'] = array( 'title' => t('Dummy'),