示例#1
0
文件: lib.php 项目: jamesmcq/elis
/**
 * Determines whether the current plugin supports the supplied feature
 *
 * @param string $feature A feature description, either in the form
 *                        [entity] or [entity]_[action]
 *
 * @return mixed An array of actions for a supplied entity, an array of
 *               required fields for a supplied action, or false on error
 */
function dhimport_multiple_supports($feature)
{
    global $CFG;
    require_once dirname(__FILE__) . '/multiple.class.php';
    $data_plugin = new rlip_importplugin_multiple();
    //delegate to class method
    return $data_plugin->plugin_supports($feature);
}
示例#2
0
 /**
  * Validate that the import process supports plugins with multiple files
  */
 public function test_importpluginssupportmultiplefiles()
 {
     global $CFG;
     $file = get_plugin_directory('dhimport', 'multiple') . '/multiple.class.php';
     require_once $file;
     $provider = new rlip_importprovider_multiple();
     $importplugin = new rlip_importplugin_multiple($provider);
     $importplugin->run();
     $bothcalled = $importplugin->both_called();
     $this->assertEquals($bothcalled, true);
 }