WebformElementAllowsTagsTest.php in Webform 6.x
File
tests/src/Functional/Element/WebformElementAllowsTagsTest.php
View source
<?php
namespace Drupal\Tests\webform\Functional\Element;
class WebformElementAllowsTagsTest extends WebformElementBrowserTestBase {
protected static $testWebforms = [
'test_element_allowed_tags',
];
public function testAllowsTags() {
$this
->drupalGet('/webform/test_element_allowed_tags');
$this
->assertRaw('Hello <b>…Goodbye</b>');
\Drupal::configFactory()
->getEditable('webform.settings')
->set('element.allowed_tags', 'ignored tag')
->save();
$this
->drupalGet('/webform/test_element_allowed_tags');
$this
->assertRaw('Hello <ignored></tag>…Goodbye');
\Drupal::configFactory()
->getEditable('webform.settings')
->set('element.allowed_tags', 'admin')
->save();
}
}