mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 00:42:54 +02:00
MDL-39854 use class loader in editor_tinymce
This commit is contained in:
parent
9e19a0f08b
commit
299e107e97
@ -111,7 +111,6 @@ class tinymce_texteditor extends texteditor {
|
||||
|
||||
protected function get_init_params($elementid, array $options=null) {
|
||||
global $CFG, $PAGE, $OUTPUT;
|
||||
require_once($CFG->dirroot . '/lib/editor/tinymce/classes/plugin.php');
|
||||
|
||||
//TODO: we need to implement user preferences that affect the editor setup too
|
||||
|
||||
@ -260,7 +259,6 @@ class tinymce_texteditor extends texteditor {
|
||||
*/
|
||||
public function get_plugin($plugin) {
|
||||
global $CFG;
|
||||
require_once($CFG->dirroot . '/lib/editor/tinymce/classes/plugin.php');
|
||||
return editor_tinymce_plugin::get($plugin);
|
||||
}
|
||||
|
||||
|
@ -36,6 +36,13 @@ defined('MOODLE_INTERNAL') || die();
|
||||
*/
|
||||
class editor_tinymce_testcase extends advanced_testcase {
|
||||
|
||||
public function test_autoloading() {
|
||||
// Note: This test core_frankestyle calssloader.
|
||||
$this->assertTrue(class_exists('editor_tinymce_plugin'));
|
||||
$this->assertFalse(class_exists('editor_tinymce_plugin_xx_yy'));
|
||||
$this->assertFalse(class_exists('\editor_tinymce\plugin'));
|
||||
}
|
||||
|
||||
public function test_toolbar_parsing() {
|
||||
global $CFG;
|
||||
require_once("$CFG->dirroot/lib/editorlib.php");
|
||||
|
Loading…
x
Reference in New Issue
Block a user