diff --git a/lib/editor/tinymce/lib.php b/lib/editor/tinymce/lib.php index c292cf8c276..3f03950ceb3 100644 --- a/lib/editor/tinymce/lib.php +++ b/lib/editor/tinymce/lib.php @@ -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); } diff --git a/lib/editor/tinymce/tests/editor_test.php b/lib/editor/tinymce/tests/editor_test.php index 1704bab5813..7e49bbe0fed 100644 --- a/lib/editor/tinymce/tests/editor_test.php +++ b/lib/editor/tinymce/tests/editor_test.php @@ -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");