Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
maxlength
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
maxlength
Merge requests
!47
Issue
#3375880
: Fix CKEditor5 library dependency.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Issue
#3375880
: Fix CKEditor5 library dependency.
issue/maxlength-3375880:3375880-fix-ckeditor5-dependency
into
3.x
Overview
0
Commits
1
Pipelines
2
Changes
3
Merged
Adam Nagy
requested to merge
issue/maxlength-3375880:3375880-fix-ckeditor5-dependency
into
3.x
1 year ago
Overview
0
Commits
1
Pipelines
2
Changes
3
Expand
Closes
#3375880
1
0
Merge request reports
Compare
3.x
3.x (base)
and
latest version
latest version
cddb7117
1 commit,
1 year ago
3 files
+
67
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
tests/src/Kernel/MaxLengthCkeditorTest.php
0 → 100644
+
54
−
0
Options
<?php
declare
(
strict_types
=
1
);
namespace
Drupal\Tests\maxlength\Kernel
;
use
Drupal\KernelTests\KernelTestBase
;
/**
* Provides kernel tests MaxLength with CKEditor5.
*
* @group maxlength
*/
class
MaxLengthCkeditorTest
extends
KernelTestBase
{
/**
* {@inheritdoc}
*/
protected
static
$modules
=
[
'maxlength'
,
'field'
,
'user'
,
'system'
,
];
/**
* {@inheritdoc}
*/
protected
function
setUp
():
void
{
parent
::
setUp
();
$this
->
installConfig
([
'maxlength'
]);
}
/**
* Tests the CKEditor5 library dependency.
*
* @covers maxlength_library_info_alter()
*/
public
function
testCkeditor5LibraryDependency
()
{
// Get the library discovery service.
/** @var \Drupal\Core\Asset\LibraryDiscovery $libraryDiscovery */
$library_discovery
=
$this
->
container
->
get
(
'library.discovery'
);
$maxlength_library
=
$library_discovery
->
getLibraryByName
(
'maxlength'
,
'maxlength'
);
$this
->
assertNotContains
(
'ckeditor5/internal.drupal.ckeditor5'
,
$maxlength_library
[
'dependencies'
]);
// Now enable CKEditor5 module.
$this
->
container
->
get
(
'module_installer'
)
->
install
([
'ckeditor5'
]);
$library_discovery
->
clearCachedDefinitions
();
$maxlength_library
=
$library_discovery
->
getLibraryByName
(
'maxlength'
,
'maxlength'
);
$this
->
assertContains
(
'ckeditor5/internal.drupal.ckeditor5'
,
$maxlength_library
[
'dependencies'
]);
}
}
Loading