function WildcardHtmlSupportTest::providerGhsConfiguration
Same name in other branches
- 9 core/modules/ckeditor5/tests/src/Kernel/WildcardHtmlSupportTest.php \Drupal\Tests\ckeditor5\Kernel\WildcardHtmlSupportTest::providerGhsConfiguration()
- 11.x core/modules/ckeditor5/tests/src/Kernel/WildcardHtmlSupportTest.php \Drupal\Tests\ckeditor5\Kernel\WildcardHtmlSupportTest::providerGhsConfiguration()
File
-
core/
modules/ ckeditor5/ tests/ src/ Kernel/ WildcardHtmlSupportTest.php, line 104
Class
- WildcardHtmlSupportTest
- @covers \Drupal\ckeditor5\Plugin\CKEditor5PluginManager::getCKEditor5PluginConfig @group ckeditor5 @internal
Namespace
Drupal\Tests\ckeditor5\KernelCode
public static function providerGhsConfiguration() : array {
return [
'empty source editing' => [
'<p> <br>',
[],
[],
],
'without wildcard' => [
'<p> <br> <a href> <blockquote> <div data-llama>',
[
'<div data-llama>',
],
[
[
'name' => 'div',
'attributes' => [
[
'key' => 'data-llama',
'value' => TRUE,
],
],
],
],
[
'link',
'blockQuote',
],
],
'<$text-container> minimal configuration' => [
'<p data-llama> <br>',
[
'<$text-container data-llama>',
],
[
[
'name' => 'p',
'attributes' => [
[
'key' => 'data-llama',
'value' => TRUE,
],
],
],
],
],
'<$text-container> from multiple plugins' => [
'<p data-llama class="text-align-left text-align-center text-align-right text-align-justify"> <br>',
[
'<$text-container data-llama>',
],
[
[
'name' => 'p',
'attributes' => [
[
'key' => 'data-llama',
'value' => TRUE,
],
],
'classes' => [
'regexp' => [
'pattern' => '/^(text-align-left|text-align-center|text-align-right|text-align-justify)$/',
],
],
],
],
[
'alignment',
],
],
'<$text-container> with attribute from multiple plugins' => [
'<p data-llama class> <br>',
[
'<$text-container data-llama>',
'<p class>',
],
[
[
'name' => 'p',
'classes' => TRUE,
],
[
'name' => 'p',
'attributes' => [
[
'key' => 'data-llama',
'value' => TRUE,
],
],
'classes' => [
'regexp' => [
'pattern' => '/^(text-align-left|text-align-center|text-align-right|text-align-justify)$/',
],
],
],
],
[
'alignment',
],
],
'<$text-container> realistic configuration' => [
'<p data-llama> <br> <a href> <blockquote> <div data-llama> <mark> <abbr title>',
[
'<$text-container data-llama>',
'<div>',
'<mark>',
'<abbr title>',
],
[
[
'name' => 'div',
],
[
'name' => 'mark',
],
[
'name' => 'abbr',
'attributes' => [
[
'key' => 'title',
'value' => TRUE,
],
],
],
[
'name' => 'p',
'attributes' => [
[
'key' => 'data-llama',
'value' => TRUE,
],
],
],
[
'name' => 'div',
'attributes' => [
[
'key' => 'data-llama',
'value' => TRUE,
],
],
],
],
[
'link',
'blockQuote',
],
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.