YamlFormElementTest.php in YAML Form 8
File
src/Tests/YamlFormElementTest.php
View source
<?php
namespace Drupal\yamlform\Tests;
use Drupal\simpletest\WebTestBase;
class YamlFormElementTest extends WebTestBase {
protected static $modules = [
'yamlform',
'yamlform_test',
];
public function testElements() {
$this
->drupalGet('yamlform/test_element_allowed_tags');
$this
->assertRaw('Hello <b>...Goodbye</b>');
\Drupal::configFactory()
->getEditable('yamlform.settings')
->set('elements.allowed_tags', 'ignored tag')
->save();
$this
->drupalGet('yamlform/test_element_allowed_tags');
$this
->assertRaw('Hello <ignored></tag>...Goodbye');
\Drupal::configFactory()
->getEditable('yamlform.settings')
->set('elements.allowed_tags', 'admin')
->save();
}
}