Loading core/modules/ckeditor5/tests/src/Unit/HTMLRestrictionsTest.php +14 −14 Original line number Diff line number Diff line Loading @@ -816,20 +816,6 @@ public function providerOperands(): \Generator { 'intersection' => 'a', 'union' => 'b', ]; yield 'wildcard + matching tag: wildcard resolves into matching tag, but matching tag already supports all attributes' => [ 'a' => new HTMLRestrictions(['p' => TRUE]), 'b' => new HTMLRestrictions(['$text-container' => ['class' => ['foo' => TRUE, 'bar' => TRUE]]]), 'diff' => 'a', 'intersection' => HTMLRestrictions::emptySet(), 'union' => new HTMLRestrictions(['p' => TRUE, '$text-container' => ['class' => ['foo' => TRUE, 'bar' => TRUE]]]), ]; yield 'wildcard + matching tag: wildcard resolves into matching tag, but matching tag already supports all attributes — vice versa' => [ 'a' => new HTMLRestrictions(['$text-container' => ['class' => ['foo' => TRUE, 'bar' => TRUE]]]), 'b' => new HTMLRestrictions(['p' => TRUE]), 'diff' => 'a', 'intersection' => HTMLRestrictions::emptySet(), 'union' => new HTMLRestrictions(['p' => TRUE, '$text-container' => ['class' => ['foo' => TRUE, 'bar' => TRUE]]]), ]; // Tag restrictions. yield 'tag restrictions are different: <a> vs <b c>' => [ Loading Loading @@ -1093,6 +1079,20 @@ public function providerOperands(): \Generator { 'intersection' => new HTMLRestrictions(['$text-container' => ['class' => TRUE], 'p' => ['class' => TRUE]]), 'union' => 'b', ]; yield 'wildcard + matching tag: wildcard resolves into matching tag, but matching tag already supports all attributes' => [ 'a' => new HTMLRestrictions(['p' => TRUE]), 'b' => new HTMLRestrictions(['$text-container' => ['class' => ['foo' => TRUE, 'bar' => TRUE]]]), 'diff' => 'a', 'intersection' => HTMLRestrictions::emptySet(), 'union' => new HTMLRestrictions(['p' => TRUE, '$text-container' => ['class' => ['foo' => TRUE, 'bar' => TRUE]]]), ]; yield 'wildcard + matching tag: wildcard resolves into matching tag, but matching tag already supports all attributes — vice versa' => [ 'a' => new HTMLRestrictions(['$text-container' => ['class' => ['foo' => TRUE, 'bar' => TRUE]]]), 'b' => new HTMLRestrictions(['p' => TRUE]), 'diff' => 'a', 'intersection' => HTMLRestrictions::emptySet(), 'union' => new HTMLRestrictions(['p' => TRUE, '$text-container' => ['class' => ['foo' => TRUE, 'bar' => TRUE]]]), ]; // Wildcard tag + non-matching tag cases. yield 'wildcard + non-matching tag: attribute diff — without possible resolving' => [ Loading Loading
core/modules/ckeditor5/tests/src/Unit/HTMLRestrictionsTest.php +14 −14 Original line number Diff line number Diff line Loading @@ -816,20 +816,6 @@ public function providerOperands(): \Generator { 'intersection' => 'a', 'union' => 'b', ]; yield 'wildcard + matching tag: wildcard resolves into matching tag, but matching tag already supports all attributes' => [ 'a' => new HTMLRestrictions(['p' => TRUE]), 'b' => new HTMLRestrictions(['$text-container' => ['class' => ['foo' => TRUE, 'bar' => TRUE]]]), 'diff' => 'a', 'intersection' => HTMLRestrictions::emptySet(), 'union' => new HTMLRestrictions(['p' => TRUE, '$text-container' => ['class' => ['foo' => TRUE, 'bar' => TRUE]]]), ]; yield 'wildcard + matching tag: wildcard resolves into matching tag, but matching tag already supports all attributes — vice versa' => [ 'a' => new HTMLRestrictions(['$text-container' => ['class' => ['foo' => TRUE, 'bar' => TRUE]]]), 'b' => new HTMLRestrictions(['p' => TRUE]), 'diff' => 'a', 'intersection' => HTMLRestrictions::emptySet(), 'union' => new HTMLRestrictions(['p' => TRUE, '$text-container' => ['class' => ['foo' => TRUE, 'bar' => TRUE]]]), ]; // Tag restrictions. yield 'tag restrictions are different: <a> vs <b c>' => [ Loading Loading @@ -1093,6 +1079,20 @@ public function providerOperands(): \Generator { 'intersection' => new HTMLRestrictions(['$text-container' => ['class' => TRUE], 'p' => ['class' => TRUE]]), 'union' => 'b', ]; yield 'wildcard + matching tag: wildcard resolves into matching tag, but matching tag already supports all attributes' => [ 'a' => new HTMLRestrictions(['p' => TRUE]), 'b' => new HTMLRestrictions(['$text-container' => ['class' => ['foo' => TRUE, 'bar' => TRUE]]]), 'diff' => 'a', 'intersection' => HTMLRestrictions::emptySet(), 'union' => new HTMLRestrictions(['p' => TRUE, '$text-container' => ['class' => ['foo' => TRUE, 'bar' => TRUE]]]), ]; yield 'wildcard + matching tag: wildcard resolves into matching tag, but matching tag already supports all attributes — vice versa' => [ 'a' => new HTMLRestrictions(['$text-container' => ['class' => ['foo' => TRUE, 'bar' => TRUE]]]), 'b' => new HTMLRestrictions(['p' => TRUE]), 'diff' => 'a', 'intersection' => HTMLRestrictions::emptySet(), 'union' => new HTMLRestrictions(['p' => TRUE, '$text-container' => ['class' => ['foo' => TRUE, 'bar' => TRUE]]]), ]; // Wildcard tag + non-matching tag cases. yield 'wildcard + non-matching tag: attribute diff — without possible resolving' => [ Loading