public function WebformHtmlHelperTest::providerToPlainText in Webform 8.5
Same name and namespace in other branches
- 6.x tests/src/Unit/Utility/WebformHtmlHelperTest.php \Drupal\Tests\webform\Unit\Utility\WebformHtmlHelperTest::providerToPlainText()
Data provider for testToPlainText().
See also
testToPlainText()
File
- tests/
src/ Unit/ Utility/ WebformHtmlHelperTest.php, line 49
Class
- WebformHtmlHelperTest
- Tests webform HTML helper.
Namespace
Drupal\Tests\webform\Unit\UtilityCode
public function providerToPlainText() {
$tests = [];
$tests[] = [
'some text',
'some text',
];
$tests[] = [
'some & text',
'some & text',
];
$tests[] = [
'<b>some text</b>',
'some text',
];
$tests[] = [
'<script>alert(\'message\');</script><b>some text</b>',
'alert(\'message\');some text',
];
return $tests;
}