Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
markdown
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
markdown
Merge requests
!44
Tests only, do not merge
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Tests only, do not merge
issue/markdown-3463119:3463119-tests_only
into
3.0.x
Overview
0
Commits
3
Pipelines
3
Changes
2
Open
Youri van Koppen
requested to merge
issue/markdown-3463119:3463119-tests_only
into
3.0.x
2 weeks ago
Overview
0
Commits
3
Pipelines
3
Changes
2
Expand
Do not merge.
0
0
Merge request reports
Compare
3.0.x
version 2
c63e053b
2 weeks ago
version 1
870317a3
2 weeks ago
3.0.x (HEAD)
and
latest version
latest version
f7cc8511
3 commits,
2 weeks ago
version 2
c63e053b
2 commits,
2 weeks ago
version 1
870317a3
1 commit,
2 weeks ago
2 files
+
41
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
tests/src/Functional/FilterAdminTest.php
+
38
−
0
Options
@@ -2,6 +2,8 @@
namespace
Drupal\Tests\markdown\Functional
;
use
Drupal\editor\EditorInterface
;
use
Drupal\editor\Entity\Editor
;
use
Drupal\filter\Entity\FilterFormat
;
use
Drupal\filter\FilterFormatInterface
;
use
Drupal\markdown\Plugin\Filter\FilterMarkdownInterface
;
@@ -60,4 +62,40 @@ class FilterAdminTest extends MarkdownBrowserTestBase {
$this
->
assertTrue
(
$markdown
->
isEnabled
());
}
/**
* Tests creating a text format using CKEditor without the markdown filter.
*/
public
function
testCreateTextFormatWithoutMarkdownFilter
()
{
// Enable the CKEditor5 module.
$this
->
container
->
get
(
'module_installer'
)
->
install
([
'ckeditor5'
]);
// Add text format.
$this
->
drupalGet
(
'admin/config/content/formats/add'
);
$format_id
=
$this
->
randomMachineName
();
$edit
=
[
'format'
=>
$format_id
,
'name'
=>
$this
->
randomMachineName
(),
'editor[editor]'
=>
'ckeditor5'
,
];
$this
->
submitForm
(
$edit
,
'Configure'
);
// Workaround for https://www.drupal.org/project/drupal/issues/3457717.
$edit
=
[
'editor[settings][toolbar][items]'
=>
'["heading","bold","italic","drupalInsertImage"]'
,
];
$this
->
submitForm
(
$edit
,
'Configure'
);
$this
->
submitForm
([],
'Save configuration'
);
$this
->
assertSession
()
->
statusCodeEquals
(
200
);
// Check that the filter has been created.
$format
=
FilterFormat
::
load
(
$format_id
);
$this
->
assertInstanceof
(
FilterFormatInterface
::
class
,
$format
);
// Check that CKEditor5 is enabled for this format.
$editor
=
Editor
::
load
(
$format_id
);
$this
->
assertInstanceof
(
EditorInterface
::
class
,
$editor
);
$this
->
assertEquals
(
'ckeditor5'
,
$editor
->
getEditor
());
}
}
Loading