public static function providerTestCreate() { $data =
[];
$data[] =
['', '', FALSE
];
// Certain tags are filtered.
$data[] =
['<script>teststring</script>', 'teststring', TRUE
];
// Certain tags are not filtered.
$data[] =
['<em>teststring</em>', '<em>teststring</em>', TRUE
];
// HTML will be normalized.
$data[] =
['<em>teststring', '<em>teststring</em>', TRUE
];
// Even safe strings will be escaped.
$safe_string =
(new Prophet())->
prophesize(MarkupInterface::
class);
$safe_string->
__toString()->
willReturn('<script>teststring</script>'
);
$data[] =
[$safe_string->
reveal(), 'teststring', TRUE
];
return $data;
} /**
* @covers ::displayAllowedTags
*/
public function testdisplayAllowedTags() { $expected = '<a> <b> <big> <code> <del> <em> <i> <ins> <pre> <q> <small> <span> <strong> <sub> <sup> <tt> <ol> <ul> <li> <p> <br> <img>';