ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilTinyMCETest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
21 require_once __DIR__ . '/bootstrap.php';
22 
28 {
29  public function testAddPlugin(): void
30  {
31  $tinymce = new ilTinyMCE();
32  $tinymce->addPlugin('a_new_test_plugin');
33  $plugins = $tinymce->getPlugins();
34  $this->assertContains('a_new_test_plugin', $plugins);
35  }
36 
37  public function testTiny3xCodeHasbeenRemoved(): void
38  {
39  $this->assertDirectoryDoesNotExist('./Services/RTE/tiny_mce_3_4_7');
40  $this->assertDirectoryDoesNotExist('./Services/RTE/tiny_mce_3_5_11');
41  }
42 
43  public function testRemovePlugin(): void
44  {
45  $tinymce = new ilTinyMCE();
46  $plugins_before_empty_removal = $tinymce->getPlugins();
47 
48  $tinymce->removePlugin('');//empty name for the plugin
49  $this->assertEquals($plugins_before_empty_removal, $tinymce->getPlugins());
50  $tinymce->removePlugin('link');
51  $this->assertArrayNotHasKey('link', $tinymce->getPlugins());
52  }
53 }
testTiny3xCodeHasbeenRemoved()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilRTEBaseTest.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...