Skip to content

Commit

Permalink
Merge branch '5.1' into 5
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Feb 13, 2024
2 parents a00bdd7 + c493485 commit 5f355fb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/php/Forms/HTMLEditor/HTMLEditorFieldTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use SilverStripe\Assets\Filesystem;
use SilverStripe\Assets\Folder;
use SilverStripe\Assets\Image;
use SilverStripe\Control\Director;
use SilverStripe\Core\Config\Config;
use SilverStripe\Dev\CSSContentParser;
use SilverStripe\Dev\FunctionalTest;
Expand Down Expand Up @@ -270,6 +271,15 @@ public function testFieldConfigSanitization()

public function testGetAttributes()
{
// If silverstripe/admin isn't installed, we can't get TinyMCEConfig attributes
// unless we set up some expected config pointing to expected files.
if (!TinyMCEConfig::config()->get('base_dir')) {
// Copied from TinyMCECombinedGeneratorTest::setUp()
Director::config()->set('alternate_base_folder', __DIR__ . '/TinyMCECombinedGeneratorTest');
Director::config()->set('alternate_public_dir', '');
TinyMCEConfig::config()->set('base_dir', 'tinymce');
TinyMCEConfig::config()->set('editor_css', ['mycode/editor.css']);
}
// Create an editor and set fixed_row_height to 0
$editor = HTMLEditorField::create('Content');
$editor->config()->set('fixed_row_height', 0);
Expand Down

0 comments on commit 5f355fb

Please sign in to comment.