function BoxesTestPlugins::testBoxesLoadPlugin in Boxes 7.2
Test loading of the plugin
File
- ./
boxes.test, line 50 - Tests for block.module.
Class
- BoxesTestPlugins
- Test the API
Code
function testBoxesLoadPlugin() {
// Load the class
$plugin_class = boxes_load_plugin_class('test_box');
$plugin_class_name = get_class($plugin_class);
// Plugin should be implement the boxesTypePluginInterface interface
if (boxes_check_plugin_class($plugin_class_name)) {
$this
->pass(t('boxes type should use the BoxTypePluginInterface interface'));
}
else {
$this
->fail(t('boxes type should use the BoxTypePluginInterface interface'));
}
// Verify that a boxes plugin with an invalid class does not load
$this
->assertFalse(boxes_load_plugin_class('test_no_boxes'), t('box type should not load with an invalid class'));
$this
->assertFalse(boxes_load_plugin_class('test_wrong_class'), t('box type should not load with an invalid class'));
}