1 <?php declare(strict_types=1);
17 return class_exists(
'org\bovigo\vfs\vfsStreamWrapper');
26 $this->markTestSkipped(
'Skipped test, vfsStream (http://vfs.bovigo.org) required');
36 'Simple HTML Elements' => [
37 '<h1><b>This</b> <i>is</i> <u>a</u> <em>Headline</em>!</h1><p>And a<br>paragraph.</p>',
38 '<h1><b>This</b> <i>is</i> <span style="text-decoration:underline;">a</span> <em>Headline</em>!</h1><p>And a<br />paragraph.</p>',
40 'Simple HTML Elements with an Invalid Tag' => [
41 '<h1>This is a <a href="mailto:info@ilias.de">Headline</a>!</h1><p>And a paragraph with an invalid element: ILIAS e.V. <info@ilias.de>.</p>',
42 '<h1>This is a <a href="mailto:info@ilias.de">Headline</a>!</h1><p>And a paragraph with an invalid element: ILIAS e.V. .</p>',
44 'Block Elements and Nested Lists' => [
45 '<div><ul><li>Php</li></ul><hr><ol><li>Unit</li></ol><dl><dt>Test</dt><dd><code>Success or Failure!</code></dd></dl></div>',
46 '<div><ul><li>Php</li></ul><hr /><ol><li>Unit</li></ol><dl><dt>Test</dt><dd><code>Success or Failure!</code></dd></dl></div>',
49 '<pre>Text</pre><blockquote><cite><sup>Q</sup>uote</cite></blockquote>',
50 '<pre>Text</pre><blockquote><p><cite><sup>Q</sup>uote</cite></p></blockquote>',
65 vfs\vfsStreamWrapper::register();
66 $root = vfs\vfsStreamWrapper::setRoot(
new vfs\vfsStreamDirectory(
'root'));
67 $cacheDirectory = vfs\vfsStream::newDirectory(
'HTMLPurifier')->at($root);
68 $cacheDirectory->chmod(0777);
101 vfs\vfsStream::url(
'root/HTMLPurifier')
103 $this->assertEquals($expected, $purifier->purify($text));
Class ilTermsOfServiceCriterionBaseTest.
testPurifyingWorksAsExpected(string $text, string $expected)
documentTextProvider
Class ilTermsOfServiceDocumentHtmlPurifier.
Class ilTermsOfServiceDocumentHtmlPurifierTest.
skipIfvfsStreamNotSupported()