function CtoolsPluginsGetInfoTestCase::assertPluginClass

Assert helper to check that a plugin can be loaded using a named class.

Parameters

$module: The module that owns the plugin.

$type: The type of plugin.

$id: The id of the specific plugin to load.

string $class: The name of the PHP class to load.

1 call to CtoolsPluginsGetInfoTestCase::assertPluginClass()
CtoolsPluginsGetInfoTestCase::testPluginLoading in tests/ctools.plugins.test
Test that plugins are loaded correctly.

File

tests/ctools.plugins.test, line 86

Class

CtoolsPluginsGetInfoTestCase
Test menu links depending on user permissions.

Code

protected function assertPluginClass($module, $type, $id, $class = 'handler') {
    $class_name = ctools_plugin_load_class($module, $type, $id, $class);
    $this->assertTrue(class_exists($class_name), t('Plugin @plugin of plugin type @module:@type successfully retrieved @retrieved for @class.', array(
        '@plugin' => $id,
        '@module' => $module,
        '@type' => $type,
        '@class' => $class,
        '@retrieved' => $class_name,
    )));
}